mozilla

Revision 11716 of min-height

  • Revision slug: CSS/min-height
  • Revision title: min-height
  • Revision id: 11716
  • Created:
  • Creator: BijuGC
  • Is current revision? No
  • Comment /* Specifications */

Revision Content

{{template.CSSRef()}}

Summary

The min-height property is used to set the minimum height of a given element. It prevents the used value of the {{template.Cssxref("height")}} property from becoming smaller than the value specified for min-height.

  • Initial value: 0
  • Applies to: block level and replaced elements
  • Inherited: no
  • Percentages: refer to the height of the containing block
  • Media: Visual

Syntax

min-height: <length> | <percentage>

Values

  • length : can be in px, cm, in
  • percentage : % specified as a percentage of containing block's width

Examples

{{template.CSSRefExampleLink("min-height")}} (FIXME)

table {min-height: 75%;}

form {min-height: 0;}

Notes

{{template.Cssxref("min-height")}} overrides both {{template.Cssxref("max-height")}} and {{template.Cssxref("height")}}.

Specifications

Browser compatibility

Browser Lowest Version
Internet Explorer 6
Netscape 6
Opera 3.5

See also

box model, {{template.Cssxref("min-width")}}, {{template.Cssxref("-moz-box-sizing")}}, {{template.Cssxref("height")}}, {{template.Cssxref("max-height")}}

Revision Source

<p> 
{{template.CSSRef()}}
</p>
<h3 name="Summary"> Summary </h3>
<p>The <code>min-height</code> property is used to set the minimum height of a given element.
It prevents the used value of the {{template.Cssxref("height")}} property from becoming smaller than the value specified for <code>min-height</code>.
</p>
<ul><li> Initial value: 0
</li><li> Applies to: block level and replaced elements
</li><li> Inherited: no
</li><li> Percentages: refer to the height of the containing block
</li><li> Media: <a href="en/CSS/Media/Visual">Visual</a>
</li></ul>
<h3 name="Syntax"> Syntax </h3>
<p>min-height: &lt;length&gt; | &lt;percentage&gt; 
</p>
<h3 name="Values"> Values </h3>
<ul><li> <b>length</b> : can be in px, cm, in 
</li><li> <b>percentage</b> : % specified as a percentage of containing block's width 
</li></ul>
<h3 name="Examples"> Examples </h3>
<p>{{template.CSSRefExampleLink("min-height")}} (FIXME)
</p>
<pre>table {min-height: 75%;}

form {min-height: 0;}
</pre>
<h3 name="Notes"> Notes </h3>
<p>{{template.Cssxref("min-height")}} overrides both {{template.Cssxref("max-height")}} and {{template.Cssxref("height")}}.
</p>
<h3 name="Specifications"> Specifications </h3>
<ul><li> <a class="external" href="http://www.w3.org/TR/CSS2/visudet.html#min-max-heights">CSS 2.1</a>
</li></ul>
<h3 name="Browser_compatibility"> Browser compatibility </h3>
<table class="standard-table">
  <tbody><tr>
    <th>Browser</th>
    <th>Lowest Version</th>
  </tr>
  <tr>
    <td>Internet Explorer</td>
    <td>6</td>
  </tr>
  <tr>
    <td>Netscape</td>
    <td>6</td>
  </tr>
  <tr>
    <td>Opera</td>
    <td>3.5</td>
  </tr>
</tbody></table>
<h3 name="See_also"> See also </h3>
<p><a href="en/CSS/box_model">box model</a>, {{template.Cssxref("min-width")}}, {{template.Cssxref("-moz-box-sizing")}}, {{template.Cssxref("height")}}, {{template.Cssxref("max-height")}}
</p>
Revert to this revision