HTML Dog
Skip to navigation

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

ValueNoteExample
[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%
autoDefault.
inherit
initial
unset

Example


nav { width: 212px; }