Tables using div and CSS


Long gone are the days when we created tables in HTML code using tags TABLE, TR, TD etc. Browsers still understand these tags and very probably still will understand them for next few years. But it is time to move forward and to use proper solution based on DIV tags and CSS properties.

Old fashion:

<table>
<tr><td>something</td><td>something other</td></tr>

</table>

New solution – most simple version, everything hard-coded in tags:
(can also be useful – if you cannot easily add or edit CSS file)

<div style=”display: table;”>

<div style=”display: table-row;”>

<div style=”display: table-cell;”>something</div>
<div style=”display: table-cell;”>something other</div>

</div>

</div>

… TODO….



Leave a Reply

Your email address will not be published. Required fields are marked *