Exploring the HTML structure I have:
<div id="container">
<h1>This is an h1 element</h1>
</div>
Upon attempting to determine the height of the container in Firefox or Chrome using JavaScript:
var container = document.getElementById("container");
var offsetHeight = container.offsetHeight;
The retrieved offsetHeight (even with clientHeight) appears incorrect. Only the height of the H1 itself is returned, excluding the margin-before/margin-after that encloses the element.
Is there a method to obtain the actual height?