CSS Min-Height Property

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:-
example of min-height
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-

More Articles

 

Share your thought



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.