You may be wondering why even if you set the margins of the td elements in a table to 0px a space still appears around them. You can remove this spacing by using: table {border-collapse: collapse;}
You may be wondering why even if you set the margins of the td elements in a table to 0px a space still appears around them. You can remove this spacing by using: table {border-collapse: collapse;}
Sure, but in addition you need to specifically remove the borders from tr and td elements – the whole solution being:
table
{
border-collapse:collapse;
}
tr,td
{
padding:0;
}
When you then need to re-instate some space between particular cells, add the following into that cell’s CSS:
.spaced_cell
{
margin-bottom:1px solid black;
}