Reputation: 663
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>
Upvotes: 35
Views: 110271
Reputation: 1282
Cell spacing & Cell padding depreciated instead use border-spacing: 0;
Upvotes: 0
Reputation: 730
Could you try this ?
table#table {
border-spacing: 0;
}
This piece of css works for me. Hope it helps :).
Upvotes: 5
Reputation: 4425
Since cellspacing
and cellpadding
are no longer supported in HTML5, use the following CSS:
table {
border-collapse: collapse;
}
Upvotes: 79
Reputation: 1
Try this answer too
table.tableclassname td
{
display: inline-block;
}
Upvotes: -2
Reputation: 131
After much trial and error, I ended up using most of what everyone else mentioned plus some from other sites. This worked for me.
table {
border:0px;
border-collapse:collapse;
border-spacing:0px;
}
td,img {
padding:0px;
border-width:0px;
margin:0px;
}
Upvotes: 13
Reputation: 4147
Use cellspacing and cellpadding :
<table cellspacing="0" cellpadding="0">
</table>
Upvotes: 53