本文档基于 CC协议(Creative Commons Share-Alike License)发布,是developer.mozilla.com, www.mozref.comwww.aptana.com共同劳动的成果。

width

Specifies the width (in pixels, points, or as a percentage) of the content of the element.

Browser/User Agent Support

IENetscapeMozillaOperaSafari
4.0+4.0+1.0+4.0+1.0+

Usage

Example values: 100px, 50%, etc.

Values

*Specify a value for width that is not on this list.
inheritInherit the value from the parent element.
autoWidth to be determined by the window or parent element.

Example

For additional information and a demonstration of the width attribute, see the demo page on quirksmode:

http://www.quirksmode.org/css/columns.html#width

Remarks

width does not include the margins, padding, or borders of an element.

Availability

W3C CSS2

Related