Re: Cell border lines via CSS style

by "Roger Stenning" <roger(at)isgwds.enterprise-plc.com>

 Date:  Sat, 26 May 2001 05:07:18 +0100
 To:  <hwg-techniques(at)mail.hwg.org>
 Cc:  <JGERSTEN(at)lchb.com>
 References: 
  todo: View Thread, Original
On Fri, 25 May 2001 12:16:38 -0700, John Gersten wrote...

John -

> I needed to create cell border lines for pages on a site I manage,
> but did not want those borders set uniformly around all four sides
> of any given cell.  So I'm used a Cascading Style Sheet to
> create limited cell border lines -- like only for the right-hand
> and bottom edges of particular cells.
>
> This works beautifully when the pages are viewed in Explorer 4
> and above, but the lines do not appear at *all* in Netscape
> browsers. Does anyone know how to tweak the style sheet to
> get these lines to appear in Netscape flavored browsers?

heh. You just found one of the limitations of NN and style sheets.
Welcome to a not-so-very-select club!

As Tamara said, it won;t work in NN, as it's not a supported feature
in that browser.

> Alternatively, is there another way to visibly border
> some-but-not-all cell lines that will work in both Explorer
> and Netscape?

Yeah, but it's an old HTML3.2 trick; never the less, it'll work in IE,
NN, Mosaic, AND Opera, to boot!

Assuming you're constructing a one-cell table, scrap it, and build a
2-column, 2-row, table. Here's the sample code, so you can follow how
I'm thinking...

<.table align="center" cellspacing="0" cellpadding="0" border="0">
<.tr>
    <.td bgcolor="#ffffcc"><.p>Sed ut perspiciatis, unde omnis iste
    natus error sit voluptatem accusantium doloremque
    laudantium.<./p><./td>
    <.td bgcolor="#000000"><.img src="fool-the-table.gif" width="1"
    height="1" border="0" alt=""><./td>
<./tr>
<.tr>
    <.td bgcolor="#000000"><.img src="fool-the-table.gif" width="1"
    height="1" border="0" alt=""><./td>
    <.td bgcolor="#000000"><.img src="fool-the-table.gif" width="1"
    height="1" border="0" alt=""><./td>
<./tr>
<./table>

I've populated the content of the top left cell with a bit of greeking
text, to sho you what it'll look like. Remove the "." from each
element of the HTML, by the way!

The image you'll be using to populate the right edge, bottom right
corner, and bottom edge cells, are the same 1x1 pixel spacing image,
which should match the desired colour of your border colour. It is
important, in this case, to match the colour to the background colour
of all three edge cells, or it'll look like a pig's ear - in other
words, if you use a blue graphic, the cell backgrounds for the edges
MUST be blue!

> I hope I've explained this with at least some clarity...after
> banging my head against my monitor over it for a week,
> I'm a little scattered....

How well I know that feeling!

> In any event, any input/info you can provide will be greatly
> appreciated. And thanks in advance for your time and
> attention.

Hope the above is of some value, John - please let me know if you have
any further problems.

Best regards,

Roger Stenning
Proprietor,
Intelligent Web Design Services
http://iws.n3.net/
(PGP public key available on request)
________________________________________________________
LEGAL DISCLAIMER: The views expressed in this message
may not be those of IWS. The information in this email and
in any attachments may be confidential and/or privileged. If you
are not the intended recipient, you should not retain, copy or
use this email for any purpose, nor disclose all or any part of
its content to any other person - you should also destroy this
message, delete any copies held on your systems and notify
the sender immediately.

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