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

Q: z-index and the body element

From: Axel Dahmen <a.dahmen@infozoom.de>
Date: Thu, 29 Jul 1999 16:32:33 -0400 (EDT)
Message-ID: <61E4277FC196D211A26B00A02498C9A70111FF@MERIDIAN>
To: "'www-style@w3.org'" <www-style@w3.org>

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)?

Alright, I know this is just a hypothetical question and I would never use
this technique to hide elements, but according to the CSS2 specification it
should be possible to hide elements by putting them behind a coloured BODY
element in the z-order (if I haven't just missed a paragraph dealing with
this in the specification :) ).

Best regards   -   Axel Dahmen


<HEAD><TITLE>Text Behind Body?</TITLE></HEAD>

<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>

Received on Friday, 30 July 1999 14:20:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:50 UTC