Wednesday, August 10, 2016

Using DIV and CSS to make a table

In modern web development I'm coming across this pattern ever more often. It looks like this:
<div class="table">
    <div class="row">
        <div class="cell"></div>
        <div class="cell"></div>
        <div class="cell"></div>
    </div>
</div>
And in CSS there is something like:
.table { display: table; }
.row { display: table-row; }
.cell { display: table-cell; }

No comments:

Post a Comment