Difference between revisions of "CSS GUIDE WIDTH"

From CDOT Wiki
Jump to: navigation, search
 
m (Usage Examples)
Line 15: Line 15:
  
 
== Usage Examples ==
 
== Usage Examples ==
<pre>table{width: 100%}</pre>
+
<pre>table{width: 100%;}</pre>
<pre>img{width: 200px}</pre>
+
<pre>img{width: 200px;}</pre>
<pre>form{width: auto}</pre>
+
<pre>form{width: auto;}</pre>
  
 
== Notes ==
 
== Notes ==

Revision as of 00:55, 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

Browser Compatibility

See Also