Element.offsetWidth (Property)

The width of the HTML element.


JScript - 3.0
Internet Explorer - 4.0
Property/method value type:Number primitive
JavaScript syntax:IEmyElement.offsetWidth

The width of the element in pixels. This value is read-only, but for some objects such as images the width property should be used instead if you need to modify the physical size of the item. The changes will be reflected in this property but you cannot make the changes by altering the value of this property from your script.

The value in this property is not supposed to include any padding, border or margin widths.

Although the name of this property implies its value is related to a parent object, in fact it is a measure of the element's width and the parentage has no bearing on that whatsoever.


See also:Element object, Element.offsetHeight

Property attributes:


insert figure 0044