Notice how the scrollbar in the first div "steals" some of div's right and bottom padding, which results in a lower return value for clientHeight and clientWidth in that div, compared to the other one. The offsetHeight and offsetWidth is not affected by this.