Reputation: 1389
I have the following problem:
I have 3 divs which 2 have position:fixed; but, since they are not on the same DOM level, the z-index doesn't work-
Please see
I am trying to move the red div on top of everything but it doesn't work. Can you help me?
Thanks
Upvotes: 1
Views: 189
Reputation: 41
Update the html as
<div id="nav"></div>
<div id="container">
<div id="div1"></div>
<div id="div2"></div>
</div>
Upvotes: 2
Reputation: 3186
jsfiddle Fixed it for you.
Adding top:0
and left:0
will position to left and top of the whole body. Also closed your div properly of the nav
element.
Upvotes: 1
Reputation: 2075
The div wasn't closed properly. You forgot an >
Result: jsFiddle. Now it's on top.
Upvotes: 5