CSS GUIDE WIDTH

From CDOT Wiki
Revision as of 01:09, 12 December 2006 by Sherman (talk | contribs) (Specification Conformance)
Jump to: navigation, search

Summary

This property is used to set the width of a given element.

Inherited: No

Syntax

TARGET_ELEMENT{width:100%}

Legal Values

% - Value specified as a percentage of the browser window. length - Value specified as a length (i.e. px, cm or in) auto - The browser will calculate and select a width for the specified element.

Mozilla Recommended Values

Usage Examples

table{width: 100%;}
img{width: 200px;}
form{width: auto;}

Notes

Specification Conformance

CSS1
CSS2
CSS3

Browser Compatibility

See Also

W3.org - Cascading Style Sheets
W3Schools