--- title: element.offsetWidth slug: Web/API/HTMLElement/offsetWidth tags: - DOM - Dokumentacja_Gecko_DOM - Gecko - Strony_wymagające_dopracowania - Wszystkie_kategorie translation_of: Web/API/HTMLElement/offsetWidth original_slug: Web/API/Element/offsetWidth ---
{{ APIRef("HTML DOM") }}
właściwość DHTML, która podaje szerokość elementu, odnosząca się do układu strony.
var intElemOffsetWidth = document.getElementById(id_attribute_value).offsetWidth;
intElemOffsetWidth
jest zmienną przechowującą liczbę całkowitą odpowiadającą wartości offsetWidth
elementu i wyrażoną w pikselach. offsetWidth
jest właściwością tylko do odczytu.
Zazwyczaj offsetWidth
elementu obejmuje jego obramowanie, wewnętrzny margines (padding), pionowy pasek przewijania (jeśli jest obecny lub renderowany) i szerokość CSS elementu.
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.
All 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
offsetWidth
jest częścią modelu obiektowego MSIE DHTML. offsetWidth
nie jest częścią żadnej specyfikacji W3C ani rekomendacji technicznej.
offsetWidth
jest własnością modelu obiektowego DHTML, który został wprowadzony przez MSIE. Czasem określany jest jako fizyczny/graficzny wymiar elementu lub jako szerokość pudełka elementu.