The max-height
property defines the maximum height of an element. The content will overflow if its height is larger than the max-height
.
max-height: value | none;
.mydiv {
border: 1px solid black;
width: 150px;
max-height: 100px;
}
value: sets the given value as the maximum height of the element.
none: sets no maximum height. (default value)