YouTip LogoYouTip

Prop Style Minheight

# Style minHeight Property [![Image 8: Style Object Reference](#) Style Object](#) * * * ## Definition and Usage The minHeight property sets or returns the minimum height of an element. The minHeight property only works on block-level elements or elements with absolute/fixed positioning. ## Syntax Set the minHeight property: Object.style.minHeight="_length|%_|inherit" Return the minHeight property: Object.style.minHeight | Value | Description | | :--- | :--- | | _length_ | Defines the minimum height in units like px, cm, etc. Default is 0. | | _%_ | Defines the minimum height as a percentage of the parent element. | | inherit | The value of the minHeight property is inherited from the parent element. | * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) All major browsers support the minHeight property. **Note:** IE7 and earlier versions do not support the "inherit" value. IE8 only supports "inherit" if a !DOCTYPE is specified. IE9 supports "inherit". * * * ## Example ## Example Set the minimum height of an element: function displayResult(){ document.getElementById("p1").style.minHeight="100px"; }

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](#)
← Prop Style MinwidthProp Style Maxwidth β†’