Re: Q: z-index and the body element

>> I've got a question regarding the z-index property: Why can I still see
>> elements which I've put *behind* the BODY element (see example below)?
>
> Because your browser has a bug or doesn't support z-index.

Or the browser *doesn't* have a bug and is properly ignoring z-index on
non-positioned elements.

>> <BODY STYLE="z-index: 0; background-color: #456789;">
>> <P STYLE="z-index: -1; color: #fedcba;">This is a test showing a text that
>> shouldn't be visible as it lies behind the body element <EM>("z-index"
>> property equals "-1").</EM>
>> </BODY>

In the example given, both elements which have a z-index *do not* have their
position property set, and since according to:

 http://www.w3.org/TR/REC-CSS2/visuren.html#z-index

the z-index property "Applies to: positioned elements", the settings on the
z-index property are ignored.

Tantek

Received on Sunday, 29 August 1999 23:17:31 UTC