min-height
Establece el alto mínimo para un elemento.
Sintaxis
{ min-height: sMinHeight }
Valores posibles
sMinHeight
Variante que especifica o recibe el ancho mínimo para un elemento:
longitud |
Número de punto flotante seguido de un designador de unidades absolutas (cm, mm, in, pt o pc) o de un designador de unidades relativas (em, ex o px). Para obtener más información acerca de las unidades de longitud admitidas, vea Referencia de unidades de longitud. |
porcentaje |
Entero seguido de un signo de porcentaje (%) que especifica el porcentaje del alto del bloque donde está incluido el elemento que se va a usar como alto mínimo del elemento. Si el alto del bloque donde está incluido el elemento no se establece de forma explícita, el elemento no tiene alto mínimo y la propiedad min-height se interpreta como 0%. Para obtener información sobre los bloques que incluyen elementos y cómo se calcula su alto, vea la especificación Cascading Style Sheets (CSS), Level 2, Revision 1 (CSS2.1) (Hojas de estilos en cascada (CSS), nivel 2, revisión 1 (CSS2.1)). |
La propiedad no tiene un valor predeterminado. No se hereda.
Ejemplos
El siguiente ejemplo muestra las ventajas de usar la propiedad min-height en vez de la propiedad height para un elemento TR:
<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 cells or rows in fixed-layout tables.
Setting the <strong>min-height</strong> property, however, accomodates overflow text
by increasing the cell or row 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 cells or rows in fixed-layout tables.
Setting the <strong>min-height</strong> property, however, accomodates overflow text
by increasing the cell or row height.</td>
</tr>
</table>
</body>
</html>
Información sobre estándares
Esta propiedad se define en la especificación Cascading Style Sheets (CSS), Level 2 (CSS2) (Hojas de estilos en cascada (CSS), nivel 2 (CSS2)).
Aplicable a
A, ABBR, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CODE, CUSTOM, DD, DEL, DFN, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HN, HR, 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, OPTION, P, Q, RT, RUBY, S, SELECT, SPAN, SUB, TABLE, TD, TH, TR, TT, U, UL, VAR, XMP