Cross browser compatible HTML table cellspacing and CSS border-spacing property

As a result of the failure of IE (IE6 and IE7) browsers to implement the border-spacing CSS property for HTML tables. The mere CSS rules below:

border-spacing:2px;
border-collapse:separate; /* border-spacing will be ignored should border-collapse:collapse;*/

Have no effect of widening the cells distance on IE.

To enable border spacing and cells gap, you will not only use the above rules in your CSS (for FF2, FF3, Opera 9.5, Safari 3 and Chrome) but also add the HTML table cellspacing property (for IE6 and IE7) to the table in HTML:

<table summary="" cellspacing="2">
...
</table>

3 thoughts on “Cross browser compatible HTML table cellspacing and CSS border-spacing property”

Comments are closed.

Scroll to Top