Google Answers Logo
View Question
Q: CSS and tables ( Answered 4 out of 5 stars,   0 Comments )
Subject: CSS and tables
Category: Computers > Internet
Asked by: hairymp-ga
List Price: $5.00
Posted: 10 Apr 2004 11:23 PDT
Expires: 10 May 2004 11:23 PDT
Question ID: 328170
Is there an CSS equal of html <table cellspacing=0>? And if it is,
what is it called?
Subject: Re: CSS and tables
Answered By: serenata-ga on 10 Apr 2004 12:59 PDT
Rated:4 out of 5 stars
Hi Hairymp ~

Unfortunately, there isn't *really* an equivalent of cellspacing in
CSS, although with a bit of work around you can add the following to
your table setup:

      table {
	border-collapse: collapse;

This fixed things up quite nicely. Border-collapse essentially causes
table cells to share borders -- if you have a configuration like this:

cell1 cell2
cell3 cell4

then cell1's right border is the same as cell2's left border, cell2's
bottom border is the same as cell4's top border, and so forth.

"border-collapse: collapse" doesn't allow you to adjust the amount of
border-spacing, but only eliminate it. If you want to be able to
adjust it, you would use:

     table {
       border-collapse: separate ;
       border-spacing: 5px ;

Unfortunately, no existing version of IE/Win32 (up to and including
IE6) supports the "border-spacing" property.

More Resources

Here is a discussion of this problem from last month in Webmaster World, here:

(scroll down to the last post by SuzyUK)

Eric Meyer, known as a CSS guru, admits it's shaky at best in this
post on, which can be found here:

If you find the above still doesn't work in whatever browser you are
using, you may want to just go ahead and use the HTML cellspacing
attribute. Unfortunately, until all browsers decide they'll build to
the W3C standards, these types of simple anomalies will happen.

Search Terms ~
  CSS equivalent cellspacing

Best of luck to you,

Google Answers Researcher
hairymp-ga rated this answer:4 out of 5 stars
Good answer, and fast. Thank you!

There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy