Categories
CSS & HTML Tips Web Design Tips and Insights

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>

By Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

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

Comments are closed.