Stack Overflow Example: Set div to match height of image.
Set a div to the same height of an image with jQuery, using tables as requested by the OP.
HTML
<table>
<tr>
<td>
<img src="http://lorempixel.com/output/animals-h-g-50-150-1.jpg" alt="image of kangaroo" id="mainImage">
</td>
<td>
<div id="commentBox">
Comment Box Content
Comment Box Content
Comment Box Content
Comment Box Content
Comment Box Content
Comment Box Content
Comment Box Content
Comment Box Content
Comment Box Content
Comment Box Content
Comment Box Content
Comment Box Content
</div>
</td>
</tr>
</table>
CSS
td { vertical-align:top; }
#commentBox {
width:150px;
overflow-y: auto;
overflow-x: hidden;
border: solid 1px #000000;
}
JavaScript
$(document).ready(function() {
var newHeight = $("#mainImage").height();
$("#commentBox").css({height:newHeight});
});