Difference between revisions of "CSS GUIDE WIDTH"

From CDOT Wiki
Jump to: navigation, search
(See Also)
(Specification Conformance)
Line 22: Line 22:
  
 
== Specification Conformance  ==
 
== Specification Conformance  ==
 +
[http://www.w3.org/TR/REC-CSS1#width CSS1]<br />
 +
[http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-width CSS2]<br />
 +
[http://www.w3.org/TR/css3-mediaqueries/#width CSS3]
  
 
== Browser Compatibility ==
 
== Browser Compatibility ==

Revision as of 01:09, 12 December 2006

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