Can anyone see a better way to do this....?
I'm trying to make a table height that lives inside a table cell change dynamically if the cell height changes.
I have this code in my JS file.
Code: Select all
function doNewHeight(tableId, cellId) {
document.getElementById(tableId).style.height = document.getElementById(cellId).offsetHeight
}Code: Select all
<table onResize="doNewHeight('table1','cell1')">
<tr>
<td id="cell1">
<table id="table1">
<tr>
<td>Bunch of pictures</td>
</tr>
</table>
</td>
</tr>
</table>If anybody can see another way around this I'd be very grateful.
Thanks