How do you prevent the red outline from being hidden by the green background-color of the th
and keep the border-collapse
? Is there a CSS spec that defines this behavior?
table {
border-collapse: collapse
}
tbody {
outline: solid red;
}
thead tr th {
background-color: green;
position: sticky;
top: 0
}
<table>
<thead>
<tr><th>header</th></tr>
</thead>
<tbody>
<tr><td>content</td></tr>
</tbody>
</table>