I'm trying to create two columns in one <td>
cell while leaving the rest of the table intact.
Here is a sample of what I'm trying to do
Here is a codepen with my table:
https://codepen.io/akamali/pen/XBVxxZ
I have tried to get it with colspan
and add two columns <tr>
inside but the result is always uneven. I also tried to add a table but did not look good at all. Any ideas?
Use colspan
as follows:
.table {
width: 100%;
background-color: #ffffff;
border: 4px solid #979797;
}
.table td {
border-right: 2px solid #979797;
border-bottom: 4px solid #979797;
padding: 50px;
height: 10px;
}
.table td:nth-child(3n+0) {
border-right: 4px solid #979797;
}
.table td:last-child {
border-right: none;
}
.table tr:last-child td {
border-bottom: none;
}
<div>
<table class="table">
<tr>
<th></th>
<th></th>
<th></th>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td colspan="3"></td>
<td colspan="3"></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With