Visit Mozilla.org

DOM:element.clientWidth

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

clientWidth is the inner width of an element in pixels. It includes padding but not the vertical scrollbar (if present, if rendered), border or margin.

[edit] Syntax and values

var intElemClientWidth = element.clientWidth;

intElemClientWidth is an integer corresponding to the clientWidth of element in pixels. clientWidth is read–only.


[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:clientWidth.png

[edit] Specification

Not part of any W3C specification.

[edit] Notes

clientWidth was first introduced in the MS IE DHTML object model.

[edit] References

[edit] See also