Set the minimum height of a <div> element:
The minHeight property sets or returns the minimum height of an element.
The minHeight property has effect only on block-level elements or on elements with absolute or fixed position.
Tip: To set or return the maximum height of an element, use the maxHeight property.
The minHeight property is supported in all major browsers.
Return the minHeight property:
Set the minHeight property:
Value | Description |
---|---|
length | Defines the minimum height in length units. Default is 0 |
% | Defines the minimum height in % of the parent element |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | 0 |
---|---|
Return Value: | A String, representing the minimum height of an element |
CSS Version | CSS2 |
Return the minimum height of a <div> element:
CSS tutorial: CSS Dimension
CSS reference: min-height property