CSS max-height property
The max-height property specifies the maximum height of the content area. If the content is larger than the maximum height, it will overflow as defined by the overflow property.[1] If the content is smaller than the maximum height, the max-height property has no effect.
Pro Tip: The value of the max-height property overrides the height property, preventing the height from becoming larger than max-height.