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.

More

Hit the Subscribe button for the latest news on my tools. No spam. Ever!
© 2020 Nguyen Huu Phuoc. All rights reserved