Click to See Complete Forum and Search --> : IE Tables using CSS
phpnovice
02-15-2006, 07:59 PM
Please, no bashing. Please just answer the question straight and to the point. Thanks.
I've searched and experimented a bit, but cannot find a solution that allows me to eliminate the TABLE HTML attribute cellspacing in favor of a CSS setting that works in IE6. I've seen the references to border-spacing but this does not seem to work in IE6. Is that correct? What is the solution for IE6? Thanks.
Cheers.
toicontien
02-16-2006, 12:55 PM
For all browsers, cellspacing is the padding on the TD tag. That should work for IE-Win too.
phpnovice
02-16-2006, 02:38 PM
Not quite. padding is inside the cell (and, yes, this works). cellspacing is outside the cell. margin would be more the equivalent of what I'm looking for -- but margin doesn't seen to work on cells, either (at least, not in IE).
toicontien
02-16-2006, 02:52 PM
GAH! I completely mis-read that!! No. There is no way to control cellspacing (emphasis added for my benefit :D ) with CSS.
Neczy
02-16-2006, 02:54 PM
Cellspacing is the correct thing to use, there is no CSS that can replace it.
ray326
02-16-2006, 03:24 PM
Actually that's handled by border-spacing but IE doesn't under stand that. Here is a demonstration for use with web browsers.
table { border: 1px solid gray; border-collapse:separate; border-spacing: 5px 10px; }
td { border: 1px solid black; padding: 1em; }
phpnovice
02-16-2006, 04:34 PM
So, does that mean there is no CSS solution for IE6?
ray326
02-16-2006, 11:20 PM
Yep. Not an unusual situation.