Reputation: 666
I have created an example to illustrate my issue as well as this fiddle
Fiddle example::
table,
tr {
border: 3px solid red;
}
#table1 {
border-collapse: collapse;
border-color: blue;
}
#table2 {
border-collapse: separate;
border-color: blue;
}
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2>border-collapse: collapse:</h2>
<table id="table1">
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
</tr>
</table>
<h2>border-collapse: separate:</h2>
<table id="table2">
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
</tr>
</table>
</body>
</html>
I'm wondering why my row border disappears when the border-collapse
is set to separate.
If you change tr
to td
in the style section, you can see that when I have a border around every cell, it does not disappear.
Upvotes: 1
Views: 2035