maxWidth property

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

Sets or retrieves the maximum width for an element.

CSS 2.1, Section 10.4

Syntax

Integer value = object.put_maxWidth(Variant v);Integer value = object.get_maxWidth(Variant* sMaxWidth);

Property values

Type: VARIANT

The maximum width for an element.

length (length)

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 % that specifies a percentage of the containing block width to use as the maximum width of the element. If the width of the containing block is not explicitly set, then the element has no maximum width and the max-width property is interpreted as 0%. For more information on containing blocks and how their widths are computed, see the Cascading Style Sheets, Level 2.1 (CSS2.1) specification.

String format

<length> | <percentage>

CSS information

Applies To All elements
Media visual
Inherited no
Initial Value

Standards information

Remarks

max-width was introduced in Windows Internet Explorer 7.

The min-width/max-width attributes apply to floating and absolutely positioned block and inline-block elements, as well as some intrinsic controls. They do not apply to non-replaced inline elements, such as table rows and row/column groups. (A "replaced" element has intrinsic dimensions, such as an img or textArea.)

This property is enabled only under the strict !DOCTYPE.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

Cascading Style Sheet Compatibility in Internet Explorer 7

 

 

Build date: 1/23/2012