Retrieves the width of the object including padding, but not including margin, border, or scroll bar.
Syntax
HTML
N/A
Scripting
[ iWidth = ] object.clientWidth
Possible Values
iWidth
Integer that
receives the width of the object, in pixels.
The property is read-only.
The property has no default value.
Example
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.
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
Standards Information
There is no public standard that applies to this property.