Reputation: 33
I've got a table with 3 cells and 1 row. I get the text to show in the cells out of a database, and my question is: How can I use a minimum height for all three cells? So they're not all the same height. As the middle column will be a bigger.
Upvotes: 3
Views: 4569
Reputation: 22171
Cells in the same row are always of same height, the height of the tallest one.
table-layout: fixed
from parent table (by default it's not there)min-height
won't work in tables, you'll have to use height
property hereth, td { padding: 4px 6px; }
. Margins won't have any effect on cells (if cells aren't collapsed with border-collapse
, then you can use border-spacing
... or padding) but table
is still affected by margin as a whole of courseUpvotes: 2
Reputation: 5069
You can use CSS:
td { height: 100px }
A table cell will expand if there's more content.
Upvotes: 3