Visit Mozilla.org

DOM:element.offsetWidth

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

Returns the layout width of an element.

[edit] Syntax

var offsetWidth = element.offsetWidth;

offsetWidth is a read-only property.

[edit] Description

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.

[edit] Example

padding-top

Gentle, individualistic and very loyal, Birman cats fall between Siamese and Persian in character. If you admire cats that are non aggressive, that enjoy being with humans and tend to be on the quiet side, you may well find that Birman cats are just the felines for you.

Image:BirmanCat.jpgAll Birmans have colorpointed features, dark coloration of the face, ears, legs and tail.

Cat image and text coming from www.best-cat-art.com

padding-bottom

LeftTopRightBottommargin-topmargin-bottomborder-topborder-bottom

Image:offsetWidth.png

[edit] Specification

offsetWidth is part of the MSIE's DHTML object model. offsetWidth is not part of any W3C specification or technical recommendation.

[edit] Notes

offsetWidth is a property of the DHTML object model which was first introduced by MSIE. It is sometimes referred to as an element's physical/graphical dimensions, or an element's border-box width.

[edit] References

[edit] See also