width property

[This documentation is preliminary and is subject to change.]

Sets or retrieves the width of the object.

Syntax

Integer value = object.put_width(Variant v);Integer value = object.get_width(Variant* sWidth);

Property values

Type: VARIANT

auto (auto)

Default. Default width of the object.

width (width)

Floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). For more information about the supported length units, see CSS Values and Units Reference.

percentage (percentage)

Integer, followed by a %. The value is a percentage of the width of the parent object, whether or not it is specified explicitly. Negative values are not allowed.

String format

auto | width | percentage

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value

Remarks

To perform operations on the numeric value of this property, use pixelWidth or posWidth.

For more information about how to access the dimension and location of elements on the page through the Dynamic HTML (DHTML) Document Object Model (DOM), see Measuring Element Dimension and Location with CSSOM in Internet Explorer 9.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

DLL

Mshtml.dll

See also

Conceptual
Measuring Element Dimension and Location with CSSOM in Internet Explorer 9
Other Resources
CSS Enhancements in Internet Explorer 6

 

 

Build date: 1/23/2012

Community Additions

Show: