I create "normal" table and all TD's have "border: 1px solid #e6e6e6" and "margin: 0". TR and TABLE have too "margin/padding: 0" but I still have space between TDs like here: h
Why? :)
<td></td>
http://jsfiddle.net/VfSdV/
The space between the table cells is controlled by the CELLSPACING attribute in the TABLE tag. By setting CELLSPACING to zero, you can remove all the space between the cells of your table.
HTML tables are comprised of rows and cells. In traditional HTML coding you remove the spacing within a cell by setting the “cellspacing” attribute to zero.
This is a Default behavior of the table cells that there is some space between their Borders. To remove this space we can use the CSS border-collapsing Property. This Property is used to set the borders of the cell present inside the table and tells whether these cells will share a common border or not.
Since cellspacing
and cellpadding
are no longer supported in HTML5, use the following CSS:
table { border-collapse: collapse; }
jsfiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With