tags:

views:

82

answers:

2

Hi,

I have an element whose position is fixed and has a z-index = 5. When I resize the browser this element appears in front of (statically positioned) elements whose z-index = 10, which is not the behaviour I expect.

If you want to see what I mean, open this page and narrow the browser window until the "Chalets des Bouleaux" logo is over the photo (the former has a z-index = 5 and the latter has z-index = 10).

Thanks, Don

+5  A: 

You will need to add "position: relative" to the elements with z-index 10.

Ian Storm Taylor
Make that *definitely*. `z-index` only applies to positioned elements. So that z-index of 10 isn't doing anything: http://reference.sitepoint.com/css/z-index
mercator
A: 

So the Chalets logo should appear over the image? Looks fine in IE8.

tsilb
No, it should appear under.
Don