CSS Property: width
The width of the content area of a box.
Any horizontal padding
, border
, or margin
will be in addition to the value of width
.
Possible Values
Value | Note | Example |
---|---|---|
[length] | Should not be a negative value. | 600px |
[percentage] | Calculated in relation to the width of the containing box. Should not be a negative value. | 25% |
auto | Default. | |
inherit | ||
initial | ||
unset |
Example
nav { width: 212px; }