Reputation: 102785
I have a table like:
<table>
<tr>
<td>...</td>
<td><div class="stretch"></div></td>
</tr>
</table>
I need to get the .stretch
to fit the height of the td
. Currently the div
has a height of 0. What am I missing?
Upvotes: 5
Views: 5800
Reputation: 1496
This should work
<table style="width: 200px; height: 200px">
<tr>
<td style="border: thin solid #FF0000; height:200px">
<div style="border: thin solid #0000FF; width:100%; height:100%;">
</div>
</td>
</tr>
</table>
Upvotes: 0
Reputation: 10490
the td must have a set size then you set the div's height:100%; or inherit pretty the same thing and you'll be good to go
Upvotes: 6