Style minHeight Property
The Style object
Definition and Usage
The minHeight property sets or returns the minimum height of an element.
The minHeight property only takes effect on block-level elements or absolutely/fixed-positioned elements.
Syntax
Sets the minHeight property:
Object.style.minHeight="
length|%
|inherit"
Returns the minHeight property:
Object.style.minHeight
| Value | Description |
|---|---|
| length | Defines the minimum height using units such as px, cm, etc. The default is 0. |
| % | Defines the minimum height as a percentage of the parent element. |
| inherit | The minHeight property value is inherited from the parent element. |
Browser support





All major browsers support the minHeight property.
**Note:** IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if a !DOCTYPE is specified. IE9 supports "inherit".
Example
Example
Sets the minimum height of an element:
This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.
Try it »
The Style object