ScanSkill

max-height

The max-height property defines the maximum height of an element. The content will overflow if its height is larger than the max-height.

Syntax

max-height: value | none;

Example

.mydiv {
            border: 1px solid black;
            width: 150px;
            max-height: 100px;
        }
max-height

Property Values

value: sets the given value as the maximum height of the element.

none: sets no maximum height. (default value)