min-height
Sets the minimum height for an element.
Syntax
{ min-height:
sMinHeight }
Possible values
sMinHeight
Variant that specifies the minimum height for an element:
length |
Floating-point number followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). For more information about the supported length units, see Length units reference. |
percentage |
Integer followed by a percent sign (%) that specifies a percentage of the containing block height to use as the maximum height of the element. If the height of the containing block is not explicitly set, the element has no maximum height and the max-height property is interpreted as 0%. For more information about containing blocks and how their heights are computed, see the Cascading Style Sheets (CSS), Level 2, Revision 1 (CSS2.1) specification. |
The property has no default value. It is not inherited.
Examples
The following example shows the benefits of using the min-height property over the height property for a TR element:
<html>
<head><title>CSS Min-Height Property Example</title>
</head>
<body>
<table border ="1" style="table-layout:fixed; width:100%;">
<tr>
<td style="height:35px;background-color:#99CCFF">This cell has the
<strong>height</strong> property set to 35px. In Internet Explorer, overflow text
is clipped when <strong>height</strong> is set on the containing element.
Setting the <strong>min-height</strong> property, however, accomodates overflow text
by increasing the element height.</td>
</tr>
<tr>
<td style="min-height:35px;background-color:#99CCFF">This cell has the
<strong>min-height</strong> property set to 35px. In Internet Explorer, overflow text
is clipped when <strong>height</strong> is set on the containing element.
Setting the <strong>min-height</strong> property, however, accomodates overflow text
by increasing the element height.</td>
</tr>
</table>
</body>
</html>
Standards information
This property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) .
Applies to
a, abbr, acronym, b, bdo, big, blockquote, body, button, caption, center, cite, code, custom, dd, defaults, del, dfn, div, dl, dt, em, embed, fieldset, font, form, frameset, frame, hn, i, iframe, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, ins, li, object, ol, p, q, s, span, sub, table, td, th, tt, u, ul, var, xmp
See also
Concepts
height
max-height
width
min-width
max-width
Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.