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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:54 GMT