April 27, 2005

A great z-index tutorial (advanced)

Update: Looks like the link is dead. Check out the reference from Baloo: Understanding z-index

I was running into a really weird problem in IE with some elements appearing behind others in the z-index, when in my mind they shouldn’t be. Everything would work fine in Firefox, but I just couldn’t get IE to behave.

After some searching, I ran across a great z-index tutorial that discusses the problem, and even includes diagrams:

aplus :: Effects of z-index value to Relative Positioned and Absolute Positioned blocks

Turns out IE deviated from the CSS spec in relation to z-index scope and ordering, and in that respect, has another CSS bug.

If you are having issues with z-index in Internet Explorer, and you realize you are using both position:relative and position:absolute in the same vicinity, I highly recommend you check out the tutorial. It took me a couple reads to digest mentally, but I was able to solve my issue. My thanks to the author for taking the time to make a great resource available!

One Comment on “A great z-index tutorial (advanced)

December 25, 2008 at 2:39 pm

Add a Comment