Re: CSS Background Image

by Andrew McFarland <aamcf(at)aamcf.co.uk>

 Date:  Mon, 15 Jul 2002 10:33:16 +0100
 To:  hwg-tech <hwg-techniques(at)hwg.org>
 References:  snet
  todo: View Thread, Original
At 21:34 14/07/02 -0400, Paul Kmecak wrote:
<snip/>
>"background-color: green;" creates a green background for the div in NS 6+ 
>& IE
>6+, but not in NS 4.79.  I want to make this work in earlier browsers 
>too.  It's
>my understanding that requires "background-image".

background-color works fine on Netscape 4, with one slight warning. If you 
set a background-color on an element and don't set a border, Netscape 4 
gets very confused. However, if you add a border, it correctly fills the 
whole element.[1] All you have to do is add a border 0.1px wide, which 
won't ever appear[2], and the background-color works.

div.navigation {
         background-color: green;
         color:  black;
         border: 0.1px solid white;
}

See http://aamcf.co.uk/netscapediv for some examples.

Andrew

--
http://aamcf.co.uk/

[1] But it gets the position of the border wrong...
[2] Or you can make the border of the div the same colour as the 
background-color of the body.

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA