Below is the snippet of code I need help with:
<table cellpadding="0" cellspacing="0" style="background-color:Aqua">
<tr>
<td>
<div style="background-color:Yellow">Navigation</div>
</td>
<td>
Content<br />Content<br />Content<br />Content<br />
</td>
</tr>
</table>
I am trying to make the height of the <div>
adjust according to the content inside the <td>
. Setting height=100% or AUTO in <div>
and <td>
is not solving the issue.
I am aware that this can be achieved using jQuery/JavaScript to dynamically set the height of the <div>
based on the content height, like so:
$(".divClass").height($(".contentClass").height());
However, I anticipate the content to expand and collapse based on user actions, so I am in search of a more robust solution. The fix should be compatible across all browsers, including IE 6 to IE 10.