Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Style minHeight Property

Style minHeight Property

Style Object Reference 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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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:

Runoob Tutorial(runoob.com)

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 »


Style Object Reference The Style object