Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
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

 Answers
9

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.


[#89119] Sunday, November 13, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
angelicajayleneh

Total Points: 216
Total Questions: 110
Total Answers: 100

Location: Sudan
Member since Tue, Aug 3, 2021
3 Years ago
;