Max-width

The   property is used in CSS and certain HTML elements. This property allows a maximum width to be set for an element box. The calculation for the element's width may be less than this value, but if the calculated  value is above this value it will recompute the   using the   value as the new   value. If the value of  is greater than the value of , the   property value becomes the   value.

Values

 * - Explicitly sets the value of this property to that of the parent.
 * - No limit is placed on the maximum allowable width for the element.
 * - Refers to an absolute measurement for the maximum computed element box width. Negative values are not allowed. Examples of lengths are,  , etc.
 * - Refers to a percentage of the width of the containing element block.

HTML example:

 H1 content.

CSS example:

h1 { max-width:500px; }