---
layout: single
property_name: max-width
---
Defines the maximum width the element can be.
The element has no limit in terms of width.
You can use numeric values like pixels, (r)em, percentages... If the maximum width is larger than the element's actual width, the max width has no effect.
If the content does not fit within the maximum width, it will automatically change the height of the element to accomodate for the wrapping of the content.
#max-width
default
max-width: none;
max-width: 2000px;
max-width: 150px;