W3C home > Mailing lists > Public > www-style@w3.org > January 1998

Background colors

From: Hakon Lie <howcome@w3.org>
Date: Thu, 29 Jan 1998 00:17:27 +0100 (MET)
Message-Id: <199801282317.AAA05075@stovner.a.sol.no>
To: "Eric A. Meyer" <emeyer@sr71.lit.cwru.edu>
Cc: www-style@w3.org
Eric A. Meyer writes:

 >    Say I have the following markup, assuming no other styles in the document:
 >      <BODY style="background-color: silver;">
 >      <P style="background-color: red;">
 >      This paragraph has a
 >      <SPAN style="background-color: transparent;">red</SPAN> background.
 >      </P>
 >      </BODY>
 >    What is the background color of the word "red?"

Assuming SPAN is an inline element and P is block-level, SPAN will be
inside the block formed by P. Since SPAN's background is transparent,
P's will shine through. Thus, the background color should be red.

-h&kon (who hasn't tested it in any browser)
Received on Wednesday, 28 January 1998 18:17:50 UTC

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