A table like this one:
<table>
<tr>
<td> ... </td>
<td> ... </td>
<td> ... </td>
</tr>
<tr>
<td> ... </td>
<td> ... </td>
<td> ... </td>
</tr>
...
</table>
How can I create one using div and css display:table rules ?
Try this ;)
CSS
.table {
display: table;
width: 500px;
}
.tr {
display: table-row;
}
.td {
display: table-cell;
}
HTML
<div class="table">
<div class="tr">
<div class="td">asdf</div>
<div class="td">asdf</div>
<div class="td">asdf</div>
</div>
<div class="tr">
<div class="td">asdf</div>
<div class="td">asdf</div>
<div class="td">asdf</div>
</div>
</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