CSS max-height property

Usage

Specifies a maximum height for an element. Not supported by Internet Explorer.

Values

  • [length] - specifies an exact maximum height
  • [percentage] - specifies the height as a percentage of the height of the containing element

Example

Code:

div {
  max-height: 300px;
}