CSS2 » Properties » max-height

Version: Level 2

Compability: Currently not supported by any browser.

Syntax:
max-height : none | length | percentage
percentage
The percentage value specifies the height of the element as a percentage of the height of the containing block (i.e., the block that contains the element). It is a positive integer number. The percent sign is mandatory.
length
The length value specifies the maximum height of the element and can be in any of the following seven units. Use the abbreviation.
 
Length Abbrev.
centimeters cm
ems em
inches in
millimeters mm
picas pc
pixels px
points pt
none
The none value specifies that there are no height limits imposed on the element.

The max-height property is used to set the maximum height of an element. Other properties can be used to set the height, width, maximum width, minimum height and the minimum width. This property is not inherited.

If a specified value for max-height is less than a previously specified value for min-height for the same element, then max-height is set to the value of min-height. If the specified value for min-height is greater than the height value for the same element, then height is set to the value of min-height.

Examples

Code:
p {max-height: 175px;}
p {max-height: 200%;}
Language(s): CSS2

See Also: