In the javascript dom - what is the difference between offsetHeight and clientHeight of an element?
clientHeight:
Returns the height of the visible area for an object, in pixels. The value contains the height with the padding, but it does not include the scrollBar, border, and the margin.
offsetHeight:
Returns the height of the visible area for an object, in pixels. The value contains the height with the padding, scrollBar, and the border, but does not include the margin.
So, offsetHeight
includes scrollbar and border, clientHeight
doesn't.