Stanimir said:
/Richard Cornford/:
I was trying to make argument that obtaining the actual height of
an element is part of the DOM Level 2 (although no the core)
specification, but I was wrong.
So not relevant to the use of offsetHeight at all.
However, where supported (and tanking variations in implementations
(their completeness and the interpretation of the more ambiguous parts
of the DOM spec) into account) - getComputedStyle - can be used to
acquire information about the height of an element. But it is necessary
to understand how CSS relates to the absolute size of the resulting
element. For example, offsetHeight would include the borders of an
element, while CSS height would specify the height inside the borders
(by CSS specification), not including the (top and bottom) border
widths. Padding, margins, the various display property types, etc, need
to be taken into account when using computed styles to acquire position
and size information.
Richard.