CSS min-height Property
CSS min-height
property specifies the minimum height of the content area of an element.
Usages
The following table outline the usages and version history of this property.
Default value: | 0 |
Applies to: | All elements except table rows |
Inherited: | No |
Version: | CSS1 |
JavaScript Syntax: | object.style.minHeight = "200px" |
Syntax
Here is a syntax for the CSS min-height
property
min-height: length | percentage | initial | inherit;
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
length | Specifies the length value expressed in px, pt, cm, em, etc. to set minimum height |
percentage | Specifies the percentage value to set minimum height |
initial | Sets default value of this property |
inherit | Inherits this property from its parent element |
Examples
The example below shows to sets height property.
div.one {
height: 100px;
min-height: 200px;
}
div.two {
height: auto;
min-height: 50px;
}
Browser Compatibility
- Google Chrome 1+
- Mozilla Firefox 3+
- Internet Explorer 7+
- Opera 4+
- Safari 2+
Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.