CSS min-height property
- Previous page min-inline-size
- Next Page min-width
Definition and Usage
min-height
Sets the minimum height of an element.
Description
This property value sets a minimum limit for the element's height. Therefore, the element can be taller than the specified value, but not shorter. Negative values are not allowed.
See Also:
CSS Tutorial:CSS Dimensions
CSS Tutorial:max-height Property
HTML DOM Reference Manual:minHeight Property
CSS Syntax
min-height: length|initial|inherit;
Property Value
Value | Description |
---|---|
length | Define the minimum height of an element. The default value is 0. |
% | Define the percentage minimum height based on the containing block-level object. |
inherit | Specifies that the min-height property should inherit its value from the parent element. |
Technical Details
Default Value: | 0 |
---|---|
Inheritance: | no |
Version: | CSS2 |
JavaScript Syntax: | object.style.minHeight="50px" |
Try It Yourself Example
- Set the minimum height of an element using pixel values
- This example demonstrates how to set the minimum height of an element using pixel values.
Browser support
The numbers in the table indicate the first browser version that fully supports this property.
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
1.0 | 7.0 | 3.0 | 2.0.2 | 4.0 |
- Previous page min-inline-size
- Next Page min-width