Learn how to set cellpadding and cellspacing in CSS?
First of all, you can control cellspacing by applying the border-spacing CSS property to your table.
If you need to support IE 5, 6, or 7, you’re almost out of luck. This will work in almost all popular browsers except for IE up through v7. For browsers which support it, this property will even allow separate horizontal and vertical spacing.
However, these browsers still support the border-collapse property, which merges the borders of adjoining table cells. If you’re trying to eliminate cellspacing (i.e. cellspacing=”0″) then border-collapse:collapse should have the same effect: no space between table cells. This support is buggy, though, as it does not override an existing cellspacing HTML attribute on the table element.
In short: for non-IE 5-7 browsers, border-spacing handles you. For IE, if your situation is just right (you want 0 cellspacing and your table doesn’t have it defined already), you can use border-collapse:collapse.
table { border-spacing:0; border-collapse:collapse; }
See this for more info.