/this-vs-that GitHub 1316★

clientHeight vs offsetHeight vs scrollHeight

clientHeight = the height of an element + the vertical padding.

offsetHeight = the height of the element + the vertical padding + the top and bottom borders + the horizontal scrollbar (if it's available).

scrollHeight = the height of element's content (including the content which isn't visible on the screen) + the vertical padding.

See also

Follow me on and to get more useful contents.