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";

Example | Values | length

Δ

Example | Values | none

Δ

Example | Values | percentage

Δ

Example | DOM

Δ

Reference

Δ