HTML Dog
Skip to navigation

CSS Property: max-width

The maximum width of the content area of a box.

As with width, the maximum width is based on the content area only — any horizontal padding, border, or margin will be in addition.

Possible Values

ValueNoteExample
[length]Should not be a negative value.800px
[percentage]Calculated in relation to the width of the containing box. Should not be a negative value.80%
noneNo maximum width constraint.
inherit
initial
unset

Example


article { max-width: 1024px; }