CSS min-height Property

Set the minimum height of a <p> element:

p {
min-height: 100px;
}

Try it Yourself »


Definition and Usage

The min-height property is used to set the minimum height of an element.

This prevents the value of the height property from becoming smaller than min-height.

Note: The value of the min-height property overrides both max-height and height.

Default value: 0
Inherited: no
Animatable: yes, see individual propertiesRead about animatable – Try it
Version: CSS2
JavaScript syntax: object.style.minHeight=”400px” Try it
CSS Syntax
min-height: length|initial|inherit;
Property Values
Value Description
length Default value is 0. Defines the minimum height in px, cm, etc.
% Defines the minimum height in percent of the containing block
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Post Author: Zahid Farid