CSS min-height

The CSS min-height property is used to set the minimum height of an element. This property ensures that the element will always have at least the specified height, even if the content is smaller.

Here is the syntax for using the min-height property:


selector {
  min-height: value;
}

Where value can be specified in pixels, percentages, or any other valid length unit.

Let's see an example of how the min-height property works:

Result:
This is a div with a min-height of 100px. Even if the content is smaller, the div will have a minimum height of 100 pixels.