HTML and CSS Reference
In-Depth Information
Name
width
Values:
<length> | <percentage> | auto
Initial value:
auto
Applies to:
Block-level and replaced elements
Inherited:
No
Percentages:
Refer to the width of the containing block
Computed value:
For auto and percentage values, as declared; otherwise, an absolute length, unless the prop-
erty does not apply to the element (then auto )
Description:
Defines the width of an element's content area, outside of which padding, borders, and mar-
gins are added. This property is ignored for inline nonreplaced elements. Negative length and
percentage values are not permitted.
Examples:
table {width: 80%;}
#sidebar {width: 20%;}
.figure img {width: 200px;}
Search WWH ::




Custom Search