W3C home > Mailing lists > Public > www-style@w3.org > July 2002


From: Sigurd Lerstad <sigler@bredband.no>
Date: Fri, 19 Jul 2002 04:32:25 -0700
Message-ID: <05e801c22f17$f4a4ceb0$481273d5@mmstudioproj>
To: <www-style@w3.org>


I'm not sure I understand how the z-index works.

In this example:

<style type="text/css">
      em {
 position: absolute;
 left: 100px;
 z-index: auto;


First <em>Absolute</em> First

Second paragraph


In all tested browers, the <em>Absolute</em> overlaps the text in the second
paragraph, okay.. the two paragraphs each create a block box.

The <em> in the first paragraph, doesn't it create a box that is a child of
the first paragraph?  I thought that the z-index specified in what order to
draw sibling elements, but apparently it doesn't? And if you treat the
box-model as a tree of boxes and you draw all boxes recursively? and if <em>
is a child of the first <p> then the <em> wouldn't overlap the second <p>..
Can someone explain to me the relationship between the boxmodel and the
z-index property? I've read "CSS2 9.9 Layered presentation" and I still
don't understand it.


Sigurd Lerstad
Received on Thursday, 18 July 2002 22:31:40 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:02 UTC