Re: Cell border lines via CSS style

by =?iso-8859-1?Q?St=E9phane?= Bergeron <stephberg(at)videotron.ca>

 Date:  Fri, 25 May 2001 19:41:27 -0400
 To:  hwg-techniques(at)hwg.org
 References:  lchb
  todo: View Thread, Original
At 03:44 PM 25/05/01 -0500, you wrote:
>Hi John,
>
>>I needed to create cell border lines for pages on a site I manage, but=20
>>did not want those borders set uniformly around all four sides of any=20
>>given cell.  So I'm used a Cascading Style Sheet to create limited cell=20
>>border lines -- like only for the right-hand and bottom edges of=20
>>particular cells.
>>
>>This works beautifully when the pages are viewed in Explorer 4 and above,=
=20
>>but the lines do not appear at *all* in Netscape browsers.  Does anyone=20
>>know how to tweak the style sheet to get these lines to appear in=20
>>Netscape flavored browsers?
>
>http://www.w3schools.com/css/css_border.asp (then scroll down)
>
>Can't do it in NN.

Well, you can... sort of... but it won't look the same and you have to use=
=20
the shorthand syntax.  Try this for example:

p.solid {border: solid 4px #000000;}

Surprisingly, it works even in NN 4.x .  You want it to look the same as in=
=20
IE, NN 6 or Opera? Add a 100% width style rule:

p.solid {border: solid 4px #000000; width: 100%;}

The dashed and dotted values display as solid and inset and outset do not=20
look as nice as in IE but exactly the same as in NN 6 (Mozilla 0.9 here)=20
and Opera (5.11).

NN 4 can't display different border styles on different sides this way=20
though because it can't handle the border-style property and you need to=20
use it to achieve this.  Even using border-top, border-right, etc doesn't=20
work in NN 4.x but at least you can get basic borders in it.

HTH!

St=E9phane Bergeron

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