Re: CSS and table cell borders

by "Tim Rivera" <lists(at)timrivera.com>

 Date:  Tue, 21 Jan 2003 00:56:49 -0500
 To:  "HWG Basics" <hwg-basics(at)hwg.org>
 References:  s8x1s5 riveraamd s8x1s52
  todo: View Thread, Original
Hello Beth,

> To get a thick border around the whole table and a thin one on the
> right side of each cell I used two table definitions in the style sheet:
one
> with the td after it to apply to all the cells for the thin lines, and one
> without it to apply to just the table itself for the thick border.  Is
this
> the right way to do it?  I ended up with an extra right border on the last
> column, but since it's only 1 pixel and the same color as the table
border,
> I don't think anyone will notice.  The table (consignment sale) is at:
> www.beth1.netfirms.com/Invitational.html.  Comments are welcome.

Yes, that would be the way to do it. And as you say, no one will notice the
extra pixel on the right border, so don't worry about it.


> Question.  I had to put "cellspacing=0" in the table tag or else the
> background showed through around every cell.  What is the CSS equivalent
of
> this?

I believe what you are seeking is this:

table.list {border-collapse: collapse}


BTW, a few months ago I put up a page while helping someone use CSS to style
a table. Perhaps you may find an idea or two:
http://www.timrivera.com/tests/csstables.html


Tim

PS: I have no idea where I got "green" from in my previous post.

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA