Max-height

The   property is used in CSS and certain HTML elements. This property allows a maximum height to be set for an element box. The calculation for the element's height 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 height for the element.
 * - Refers to an absolute measurement for the maximum computed element box height. Negative values are not allowed. Examples of lengths are,  , etc.
 * - Refers to a percentage of the height of the containing element block. If a height is not explicitly given for the containing block, it should be treated like.

HTML example:

 H1 content.

CSS example:

h1 { max-height:20px; }