Style minHeight Attribute
- Nakaraang Pahina maxWidth
- Susunod na Pahina minWidth
- Bumalik sa Nakaraang Pahina Object ng HTML DOM Style
Definition and Usage
minHeight
Property sets or returns the minimum height of an element.
minHeight
This property is only valid for block-level elements or elements with absolute or fixed positioning.
Tip:To set or return the maximum height of an element, use maxHeight property.
See also:
CSS Tutorial:CSS Dimension
CSS Reference Manual:min-height property
Example
Example 1
Set the minimum height of the <div> element:
document.getElementById("myDIV").style.minHeight = "100px";
Example 2
Return the minimum height of the <div> element:
alert(document.getElementById("myDiv").style.minHeight);
Syntax
Return minHeight property:
object.style.minHeight
Set minHeight property:
object.style.minHeight = "length|%|initial|inherit"
Attribute value
Value | Description |
---|---|
length | Defined in length units. Default is 0. |
% | Defined in percentage of the parent element's height. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | 0 |
---|---|
Return value: | String, that represents the minimum height of an element. |
CSS Version: | CSS2 |
Suporta ng Browser
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Suporta | Suporta | Suporta | Suporta | Suporta |
- Nakaraang Pahina maxWidth
- Susunod na Pahina minWidth
- Bumalik sa Nakaraang Pahina Object ng HTML DOM Style