A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/HTMLElement/clientWidth below:

clientWidth ยท WebPlatform Docs

clientWidth

Property of dom/HTMLElementdom/HTMLElement

Syntax
var result = element.clientWidth;
element.clientWidth = value;
Examples

This example shows how the clientWidth property and the offsetWidth property measure document width differently. The width of the div is set to 200, and this is the value retrieved by the offsetWidth property, not the clientWidth property.

<DIV ID=oDiv STYLE="overflow:scroll; width:200; height:100"> . . . </DIV>
<BUTTON onclick="alert(oDiv.clientWidth)">client width</BUTTON>
<BUTTON onclick="alert(oDiv.offsetWidth)">offset widthY</BUTTON>

View live example

Syntax Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4