CSS | min-height Property
The min-height property in CSS is used to set the minimum height of an element. The min-height property is used when the content of element is smaller then the min-height and if the content is larger then the min-height then it has no effect. This property ensures that the value of the height property is not less than the specified min-height value of the element in consideration.
Syntax:
min-height: length|initial|inherit;
Property Value:
- length: This property is used to set the min-height. The default value of length is 0. The height can be set in form of px, %, cm etc.
Syntax:
min-height: length;
Example:
<!DOCTYPE html><html><head><title>min-height property</title><style>p {min-height:10px;border:1px solid black;}</style></head><body><p>Prepare for the Recruitment drive of productbased companies like Microsoft, Amazon, Adobeetc with a free online placement preparationcourse. The course focuses on various MCQ's& Coding question likely to be asked in theinterviews & make your upcoming placementseason efficient and successful.</p></body></html>chevron_rightfilter_noneOutput:

- initial: It is used to set the value of min-height property to its default value.
Syntax:
min-height: initial;
Example:
<!DOCTYPE html><html><head><title>min-height property</title><style>p {min-height:initial;border:1px solid black;}</style></head><body><p>Prepare for the Recruitment drive of productbased companies like Microsoft, Amazon, Adobeetc with a free online placement preparationcourse. The course focuses on various MCQ's& Coding question likely to be asked in theinterviews & make your upcoming placementseason efficient and successful.</p></body></html>chevron_rightfilter_noneOutput:

- inherit: This property is inherited from its parent.
Supported Browsers: The browser supported by min-height property are listed below:
- Google Chrome 1.0
- Internet Explorer 7.0
- Firefox 3.0
- Safari 2.0.2
- Opera 4.0
Recommended Posts:
- HTML | DOM Style minHeight Property
- CSS | transition-property Property
- CSS | all Property
- CSS | right Property
- CSS | top Property
- CSS | visibility Property
- HTML | DOM URL Property
- CSS | flex Property
- CSS | max-width Property
- CSS | tab-size Property
- CSS | border-top Property
- CSS | max-height Property
- CSS | cursor property
- HTML | DOM Bdo dir Property
- CSS | margin-right Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



