Share:

Difference between scrollHeight, offsetHeight, and clientHeight. Box model in CSS | Saatody | Amit Padhiyar

scrollHeight

scrollHeight is a measurement of the height of an element's content including content not visible on the screen due to overflow.

offsetHeight

offsetHeight is a measurement which includes the element borders, the element vertical padding, the element horizontal scrollbar (if present, if rendered) and the element CSS height.

clientHeight

It returns the inner height of an element in pixels, including padding but not the horizontal scrollbar height, border, or margin.

For more information see answer of StackOverflow and for Box model checkout mozilla answer.

Comments

Popular posts from this blog

Basic Audio Operations With MP3 And Wave Files Using NAudio C#

Get Color From Pixel C# WPF | Saatody | Amit Padhiyar

Create Drag And Drop Operation Between DevExpress GridControl And Custom WPF UI | Saatody | Amit Padhiyar