min-height

Establece el alto mínimo para un elemento.

Sintaxis

{ min-height: sMinHeight }

Valores posibles

sMinHeight

Variante que especifica el alto mínimo de un elemento:

length

Número de punto flotante seguido por un designador de unidades absolutas ( cm , mm , in , pt o pc ) o 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.

percentage

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áximo del elemento. Si el alto del bloque donde está incluido el elemento no se establece de forma explícita, el elemento no tiene ningún alto máximo y la propiedad max-height se interpreta como 0% . Para obtener más 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)) Ee371278.xtlink_newWindow(es-es,Expression.40).png.

La propiedad no tiene un valor predeterminado. No se hereda.

Ejemplos

El siguiente ejemplo muestra las ventajas de usar la propiedad min-heightmin-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 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>

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)) Ee371278.xtlink_newWindow(es-es,Expression.40).png.

Aplicable a

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

Vea también

Conceptos

height
max-height
width
min-width
max-width