<table class="table-grid">
<tr>
<td>
First cell in main table.
</td>
<td>
<table class="table-grid">
<tr>
<td>
First cell in, first nested table.
</td>
<td>
<table class="table-grid">
<tr>
<td>
Second nested table, nested table, cell
</td>
</tr>
<tr>
<td>
Second nested table, nested table, cell
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
.table-grid{
border-collapse: collapse;
}
.table-grid > tr > td {
padding: 0;
}
.table-grid>thead>tr>th,
.table-grid>tbody>tr>th,
.table-grid>tfoot>tr>th,
.table-grid>thead>tr>td,
.table-grid>tbody>tr>td,
.table-grid>tfoot>tr>td {
border: 1px solid red;
}
.table-grid .table-grid td
{
border-top:0;
border-right: 1px solid red;
border-bottom: 0;
border-left: 0;
}
.table-grid .table-grid td:last-child,
.table-grid .table-grid th:last-child {
border-right: 0;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.