Re: Background colors

The problem with Navigator is that it incorrectly only provides background
under the text, not to the end of the line as it should. The line with the
span in it is three flow objects.

You can almost "fix" navigators behaviour by stipulating an invisible
border, and setting the width to 100%. (This doesnt alter the IE4 display at
all), but wouldnt it be nice if Netscape just got it right rather than
having us promulgate fixes!!
    Incidently I routinley use this method when I want a back ground color,
cos netscapse way looks UGLY.
 Code follows.

    Frank

<HTML>
<STYLE>
BODY{background-color:gray;}
/*border and width properties necessary to ensure correct display in
Navigator*/
P{background-color:green;border:none thin;width:100%}
DIV{background-color:blue;border:none thin;width:100%}
SPAN{background-color:transparent;}
</STYLE>
<BODY>
<DIV>
Some Text
<P>This line should all be on a<SPAN> green </SPAN> background.</P>
This line on a <SPAN> blue</SPAN> background.
</DIV>
This line on a <SPAN> gray</SPAN> background.
</BODY>
</HTML>

-----Original Message-----
From: Eric A. Meyer <emeyer@sr71.lit.cwru.edu>
To: www-style@w3.org <www-style@w3.org>
Date: Wednesday, January 28, 1998 3:03 PM
Subject: Background colors


>   I thought I'd toss this one at the list and see what came back.  Note
>that the Big Two browsers disagree concerning the answer to the following
>question.  I can understand the rationale behind both answers.  Thus I
>bring it before you.
>   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?"
>
>--
>Eric A. Meyer  -  eam3@po.cwru.edu  -  http://www.cwru.edu/home/eam3.html
>  Editor, WebReview's Style Sheets Reference Guide
>  http://style.webreview.com/
>
>
>

Received on Wednesday, 28 January 1998 19:29:55 UTC