Element Properties: offsetWidth

By: Dusty Arlia
Published on Friday, August 23, 2013, 08:51 PM
Last Updated on Tuesday, July 14, 2015 at 12:37 AM
Total Updates: 3

The readonly offsetWidth property of any HTML element, returns the width of that element including its padding, scrollbar, and border in pixels (it does not include its margin).

Here is the basic syntax of the offsetWidth property:

var offsetWidth_value = element.offsetWidth;

Comments:

Ad:

Ad: