css.properties

min-height

The min-height property sets the minimum height of an element.

Formal Syntax

auto | <length-percentage [0,∞]> | min-content | max-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()> | stretch | fit-content | contain

See specification

JavaScript Access

// Access via element.style
element.style.minHeight = 'auto';

Logical Property Group

This property belongs to the min-size logical property group, which includes:

Browser Support

standard | MDN · Spec

FeatureChromeFirefoxSafariEdge
min-height131.312
anchor-size12514726125
auto2134712
fit-content46941179
fit-content_function91
max-content46661179
min-content46661179
stretch1389138

Behind a Flag

Some browsers require enabling a flag or preference:

  • min-height: fit-content_function — firefox: #layout.css.fit-content-function.enabled (since 91)

Related Properties