Reputation:
I have used the css property border-collapse: collapse
, but it seems not to be working.
Here is the html
<table cellspacing="0">
<tr>
<td>This is demo</td>
<td>This is demo</td>
</tr>
<tr>
<td>This is demo</td>
<td>This is demo</td>
</tr>
<tr>
<td>This is demo</td>
<td>This is demo</td>
</tr>
</table>
And the CSS
table tr td {
border: 2px solid red;
border-collapse:collapse;
}
Upvotes: 1
Views: 102
Reputation: 6554
You need to apply the property on the table, not on the td,
table {
border-collapse:collapse;
}
table tr td {
border: 2px solid red;
}
Upvotes: 1