CSS max-height property
Description of property definition and use
The max-height property sets the maximum height of the element.
Note: Max-height properties do not include padding, borders, or margins!
Default: | none |
---|---|
Inherited: | no |
Version: | CSS2 |
JavaScript syntax: | object .style.maxHeight="10px" |
Browser support
The numbers in the table support the first browser version number of the property.
Attributes | |||||
---|---|---|---|---|---|
max-height | 1.0 | 7.0 | 1.0 | 2.0.2 | 7.0 |
The property value
Value | Describe |
---|---|
none | Default. Defines that there is no limit to the maximum height an element can be allowed. |
length | Defines the maximum height value of an element. |
% | Defines the maximum height based on the percentage of block-level objects that contain it. |
inherit | Specifies that the value of the max-height property should be inherited from the parent element. |
Related articles
CSS tutorial: CSS Dimension
CSS Reference Manual: min-height properties