In this chapter you will learn:
About min-height property
Values of min-height property
Example of this property
CSS min-height property is used to set the minimum height of the element so if you have defined the min-height of any element then you can’t set the height of that element smaller than min-height.
Values of min-height property-| Values | Description |
|---|---|
| % | Used to set the minimum height in % (percent) |
| length | Used to define minimum height in cm, px etc. |
| initial | Used to specify the default value of the property. |
| inherit | inherit value from parent element |
Examples of this property-
<html>
<head>
<title>Example of min-height property</title>
<style type="text/css">
div
{
min-height:120px;
background-color:Gray;
}
</style>
</head>
<body>
<div> This is the example of min-height property. <br/>
The minimum height of this division has set to 120px so <br/>
you can't set its height smaller than the min-height.</div>
</body>
</html>
Output:-
SUMMARY
In this chapter, you have learned about the min-height property with a given program so try it yourself and click on Next button to continue-