CSS min-height property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerFully supports
EdgeFully supports
OperaFully supports
Description
CSS min-height specifies the minimum height of an element.
It represents the minimum height of an element no matter whether the content is present or not.
Syntax
min-height : none | min-content | max-content | +ve length | +ve percentage | auto
Property values
min-content
-
min-content value specifies that the minimum height of element must be equal to or greater than the largest minimum height of some descendant item.
- Try it
min-height: min-content; max-content
-
max-content value represents that the minimum height of element must be equal to or greater than the largest maximum height of some descendant item.
- Try it
min-height: max-content; +ve percentage
-
The height of element should be at least 30% of the parent box.
- Try it
min-height: 30%; auto
-
auto value means the height will be changed automatically according to the content.
- Try it
min-height: auto;
Applicable to
It applies to all elements