Skip to content Skip to sidebar Skip to footer

How Can I Calculate The Rendered Height Of An Html Table, From Within Javascript?

When the window is resized, I need to know how big the table is, so I can dynamically fit everything else nicely in-between. The table height is solely dependant on the contents, w

Solution 1:

You can use element.offsetHeight for this.

var table = document.getElementById("tableId");
alert(table.offsetHeight);

Post a Comment for "How Can I Calculate The Rendered Height Of An Html Table, From Within Javascript?"