Add space between cells (td) using css
Solution 1:
You want border-spacing
:
<table style="border-spacing: 10px;">
Or in a CSS block somewhere:
table {
border-spacing: 10px;
}
See quirksmode on border-spacing
. Be aware that border-spacing
does not work on IE7 and below.
Solution 2:
table {
border-spacing: 10px;
}
This worked for me once I removed
border-collapse: separate;
from my table tag.
Solution 3:
Mine is:
border-spacing: 10px;
border-collapse: separate;
Solution 4:
Consider using cellspacing
and cellpadding
attributes for table
tag or border-spacing
css property.
Solution 5:
cellspacing (distance between cells) parameter of the TABLE tag is precisely what you want. The disadvantage is it's one value, used both for x and y, you can't choose different spacing or padding vertically/horizontally. There is a CSS property too, but it's not widely supported.