VOOZH about

URL: https://www.geeksforgeeks.org/css/css-min-height-property/

⇱ CSS min-height Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

CSS min-height Property

Last Updated : 28 Aug, 2024

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 the element is smaller than the min-height and if the content is larger than the min-height then it has no effect. This property ensures that the value of the height property is not less than the specified 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 the form of px, %, cm etc. 
  • initial: It is used to set the value of min-height property to its default value. 
  • inherit: This property is inherited from its parent.

Example: In this example, we are using the min-height: length property.

Output:👁 min height

Example: In this example, we are using the min-height: initial property.

Output:👁 min height

Supported Browsers: The browser supported by min-height property are listed below:

  • Google Chrome 1.0
  • Edge 12.0
  • Firefox 3.0
  • Safari 1.3
  • Opera 4.0
Comment