Possible Duplicate:
Mininum and Maximum value of Z-INDEX
I see some top z-index in some pages,always 9999,
However is there a top limit about z-index?
Can I set it 9999999?10000000? Or even more greater?
Thank you
Possible Duplicate:
Mininum and Maximum value of Z-INDEX
I see some top z-index in some pages,always 9999,
However is there a top limit about z-index?
Can I set it 9999999?10000000? Or even more greater?
Thank you
Taken from here:
Not really, but you might consider the natural limitations of a system, like an int range. I'd probably keep it under 32,767. I've definitely exceeded that in javascript while working on a similar problem, and didn't encounter any problems on the major browsers and platforms that I was concerned about at the time.
In the case of 3rd party ads and overlays, making sure that wmode="transparent" on the flash embed is a common problem along the same lines. Also worth noting that IE has a bug with stacking z-indexes, so if you're not seeing success, make sure you're not hitting your head up against the wall with that one*.
I always like to keep to some kind of convention, and not use arbitrary figures. For example, maybe everything in my css falls between 0 and 10. Maybe dhtml stuff happens in the 100's place values, with a meaningful z-index for any given module.
*Sidenote: The IE bug, to be specific, is that IE considers a new instance of document flow to be a new stacking context for z-index. You need to make sure that your z-indexes aren't being lost in the DOM hierarchy when a child node that would normally be inheriting your z-index is being rendered it's own positioning context.