Vote count:
0
maybe this question is crazy, I would like to know if there is a way to have an element with css position:absolute that jumps one parent and respect parent's parent left and top.
<div id='parentParent' style="left:0;top=0;" >
<div id='parent' style="left :50% ; top:50%" >
<canvas id='myElement' style="position:absolute" ></canvas>
</div>
</div>
In this case, I need to have myElement inside parent div, but I can't change parent left and top, so I would like to avoid parent's left and top = 50% and has left=0 and top=0 but as it is absolute I think it takes parent's left and top. How can I achieve it? preserving this nesting order. Sorry if this doesn't makes sense or is stupid, but I would like to know if there is a way.
Thank you in advance.
asked 54 secs ago
Aucun commentaire:
Enregistrer un commentaire