Re: CSS NS & border/background

by Al Sessions <al(at)oldforgefd.org>

 Date:  Fri, 28 Jun 2002 08:25:36 -0700
 To:  hwg-techniques(at)mail.hwg.org
 References: 
  todo: View Thread, Original
At 11:30 PM 6/27/2002 -0700, you wrote:
>Again, im still learning about CSS...VERY new...but can i really NOT get a
>solid/ridged/etc border around *and* a background (behind?) an element and
>have the background completely filling in the element in Netscape 4.x? Doing
>something like this?
>
>.myborderstuff { background-color: purple; border-color: yellow;
>border-style: ridge; border-width: 2px; }
>
>Does the question make sense? You know, i just want to have a box, with a
>purple background, and a yellow border around it, where the purple
>completely fills in the box.
>
>Is this possible in NS 4.x? Am i just missing something really simple?
>Works fine in IE5, and even Opera 5.

Old Netscape is pretty funky with borders. For example it doesn't support 
borders on inline elements, rather it converts them to block level elements 
and adds extra space. Backgrounds are also problematic as it likes to put 
the background just behind the text if the box doesn't have borders, or 
likes to leave a gap even if it you have managed to get the borders to work.

It seems to work best if you declare all four sides with shorthand, like:
.myborderstuff {border:2px ridge #FFFF00;}

You may want to put additional (or more specific) properties in an imported 
stylesheet to hide it from NN<6.

More information is at, 
http://www.webreview.com/style/css1/charts/mastergrid.shtml

-----------------------------------------
Al Sessions
al(at)oldforgefd.org
http://www.fultonchaindesign.com/mt (personal weblog)

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