Properties
CSS
max-height
The max-height property constrains the height of an element to a maximum range.
CSS2
max-height: <length> | <percentage> | none | inherit
| Initial: | none |
| Applies To: | all elements but non-replaced inline elements, table columns, and column groups |
| Inherited: | no |
| Percentages: | refer to height of containing block |
| Media: | visual |
Note: Doctype is required for Internet Explorer 8+
Values
max-height: value;
| Value: | Description: |
| inherit | Takes the same computed value as the property for the element's parent |
| length | Fixed maximum height |
| none | No height limit |
| percentage | Height percentage calculated with respect to the height of the containing block |
DOM
[window.]document.getElementById("element-id").style.maxHeight = "max-height";
