If I have
<table>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
and
table
{ width: 100%; height: 100%; }
Each cell takes up an equal quarter of the table, and the table stretches to fit the window.
How can I prevent these table cells from resizing themselves to fit the content within the cells (while still fitting the table's container)?
You could try table-layout:fixed;
- this sets the layout to a certain fixed size (specified in CSS) and ignores the content of the cells, so the width of the cell never changes. I'm not sure if this affects vertical layout or not.