Hi all,
I've met a problem with Opera and its ability to render absolutely
positioned divs inside relatively positioned parent blocks, themselves
contained inside a relatively positioned block.
I'm surely missing something, but what? Any help would be kindly
appreciated :)
Here's a code sample:
..grandparent{position:relative;}
..parent{position:relative;}
..parent .sub{
position:absolute;
top:19px;
left:0px;
display:none;
z-index:1;
}
<div class="grandparent">
<div class="parent">
<div class="sub">text</div>
</div>
</div>
The display:none property is modified to display:block on a click
event happening somewhere else. Hence the hidden div appears as a
submenu, whose position depends on the parent block.
Any clue on why Opera cannot position this child block correctly? Or
is there anything wrong with my way of doing it? In fact, the .sub
divs seem to be positioned relative to the .grandparent div, not their
respective .parent divs.
Thanks for the anwser