Visit Mozilla.org

DOM:element.clientWidth

z Mozilla Developer Center, polskiego centrum programistów Mozilli.

« Dokumentacja Gecko DOM

Spis treści

[edytuj] Podsumowanie

clientWidth to wewnętrzna szerokość elementu w pikselach. Zawiera margines wewnętrzny (padding), ale pomija pionowy pasek przewijania (jeśli jest obecny lub renderowany), obramowania i margines zewnętrzny (margin).

[edytuj] Składnia i wartości

var w = element.clientWidth;

w to liczba całkowita odpowiadająca clientWidth elementu w pikselach. clientWidth jest tylko do odczytu.

[edytuj] Przykład

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

[edytuj] Specyfikacja

Nie należy do żadnej ze specyfikacji W3C.

[edytuj] Uwagi

clientWidth został wprowadzony w modelu obiektowym DHTML przeglądarki Internet Explorer.

[edytuj] Dokumentacja