133
rated 0 times
[
139]
[
6]
/ answers: 1 / hits: 31771
/ 13 Years ago, tue, november 15, 2011, 12:00:00
I notice that offsetwidth
is a slightly bigger number. Similarly for style.height
and offsetheight
.
More From » html
I notice that offsetwidth
is a slightly bigger number. Similarly for style.height
and offsetheight
.
Typically, an element's offsetWidth is a measurement which includes the element borders, the element horizontal padding, the element vertical scrollbar (if present, if rendered) and the element CSS width.
Source: https://developer.mozilla.org/en/DOM/element.offsetWidth
So, it's the width of your element with border and padding included. Same thing for height.