Leo Loki Leo Loki - 1 year ago 99
CSS Question

Wrap table row to the next line

<table id="table_id">
<tr>
<td>testtesttesttest</td>
<td>testtesttesttest</td>
</tr>
</table>


I would like that if the table does not fit on the screen, then to the second cell of the table will be transferred to another row down? Not the text in the cell, but the whole cell.

Answer Source

Change the cells to inline blocks:

#table_id  { display: block; }
#table_id  td {display: inline-block; }

jsfiddle

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download