CSS min-height property
Example
Set the minimum height of a paragraph:
p
{
min-height:
100
px
;
}
Try it »
Property definition and usage
The min-height property sets the minimum height of an element.
Note: The min-height property does not include padding, borders, or margins!
| Default value: | 0 |
|---|---|
| Inherited: | no |
| Version: | CSS2 |
| JavaScript syntax: | object.style.minHeight="10px" |
Browser support
The numbers in the table indicate the first browser version that supports this property.
| property | |||||
|---|---|---|---|---|---|
| min-height | 1.0 | 7.0 | 3.0 | 2.0.2 | 4.0 |
Attribute values
| Value | Description |
|---|---|
| length | Defines the minimum height of an element. The default value is 0. |
| % | Defines a percentage minimum height based on the containing block-level object. |
| inherit | Specifies that the value of the min-height property should be inherited from the parent element. |
Related Articles
CSS Tutorial: CSS Dimension
CSS Reference Manual: max-height property