CSS max-height Property

The css max-height property sets the maximum height for an element. It prevents the height of the element to exceed the specified value. If min-height is specified and is greater than max-height, max-height is overridden.

Syntax for max-height property

length | percentage | none | inherit