back

Max-Width

Max-width is used the set the maximum width of an element.
The elements width will not become bigger than max-width.

It will override the width attribute.
You can also use min-width.

The options are:
(1) None, there is no maximum width
(2) Length, allows you to set it as a value like px or cm
(3) Percentage, allows you to set the max-width as a percentage of its containing element.
(4) Inherit, the value will be inherited from its parent element.

Example