To specify max height of a view. It prevents the applied value of height
becoming larger than the specified value of max-height
.
The priority of max-height
is higher than height
and min-height
.
<length>
<length>
Defines the max-height as an absolute value.
<percentage>
Defines the max-height
as a percentage of the containing block's height.
Initial value | no limit |
Applies to | all elements |
Inherited | no |
Animatable | |
Percentages | The percentage is calculated with respect to the height of the generated box's containing block |
max-height
is higher than height
and min-height
. While in Web, max-height
overrides height
, but min-height
overrides max-height
.max-height
is specified smaller than min-height
, min-height
will be ignored.none
, max-content
, min-content
, fit-content
, min-content
are not supported.LCD tables only load in the browser