CSS max-heightProperty
Property definition and usage instructions
The max-height property sets the maximum height of an element.
Note:The max-height property does not include padding, borders, or margins!
| Default value: | none |
|---|---|
| Inherited: | no |
| version: | CSS2 |
| JavaScript Syntax: | object.style.maxHeight="10px" |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
| Property | |||||
|---|---|---|---|---|---|
| max-height | 1.0 | 7.0 | 1.0 | 2.0.2 | 7.0 |
Property value
| Value | Description |
|---|---|
| none | Default. Defines no limit on the maximum height allowed for the element. |
| length | Defines the maximum height value of an element. |
| % | Defines the maximum height as a percentage based on the containing block object. |
| 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 Property
other extensions