Z-index: don’t expect me to be working without no positioning!
Posted Jan 19th, 2009 by David Calhoun in cssI’m thinking of starting a section for “D’oh Moments” - aka moments where I made a simple mistake but it took me an unusually long time to solve the problem.
In this case it’s z-index, which I was trying to implement to fix a problem on IE (where most of the problems end up being, as you know). The problem is that z-index had absolutely not effect. D’oh! That’s because one element wasn’t being positioned. Simply apply this tag:
position: relative;
Apply that to whatever you’ve positioning with z-index, and voila, z-index magically works! Noob mistake caused by me not reading the documentation close enough…
Leave a Reply
Categories
- accessibility (1)
- browser bugs (2)
- css (6)
- html (6)
- javascript (10)
- jquery (4)
- mobile (1)
- performance (2)
- php (1)
- regular expressions (1)
- rss (3)
- seo (1)
- Site News (1)
- table (1)
- Uncategorized (4)
- videos (2)
- wordpress (1)
- xml (2)
- yui (0)