[thelist] netscape 7 + neg. z-indexes

liorean liorean at f2o.org
Thu Mar 27 12:10:59 CST 2003


matt s. wrote:
> hmm. Actually, I have one div set to -1, and then the one above it set
> to 0. Could that be the
> problem? Is 0 not recognized as a z-index?

0 is a recognised z-index, but z-indices are hierarchical...

Take this XML tree, for instance:

<root>
   <top style="z-index: 2;" id="t1">
     <bottom style="z-index: 0;" id="t1b1">
     <bottom style="z-index: 3;" id="t1b2">
   </top>
   <top  style="z-index: 1;" id="t2">
     <bottom style="z-index: -1;" id="t2b1">
     <bottom style="z-index: 4;" id="t2b2">
   </top>
</root>

The top elements are z-indiced relative to each other because they have 
no enclosing z-index, but the bottom elements are relative to only those 
inside the same z-indiced element as themselves.

So, sorting order when it comes to z-indices comes to the following:

t1
   >t1b2
   >t1b1
t2
   >t2b2
   >t2b1

NOT the order most people would assume, which is that all play on the 
top level:

t2b2
t1b2
t1
t2
t1b1
t2b1

-- 
liorean <mailto:liorean at user.bip.net>

ViewStyles, ViewScripts, ToggleStyles and GraphicsInfo bookmarklets and 
Theme Switcher, Cookies Handler scripts:
<http://liorean.web-graphics.com/>



More information about the thelist mailing list