min-height

Resumen

La propiedad min-height se utiliza para definir la altura mínima de un elemento dado. Impide que el valor de la propiedad height llegue a ser más pequeña que la especificada en la altura mínima (min-height).

Valor inicialauto
Applies toelementos de bloque o remplazados
Heredableno
PercentagesSe refiere a la altura del bloque contenedor.
Valor calculadothe percentage as specified or the absolute length
Animation typea length, percentage or calc();

Sintaxis

min-height = 
auto |
<length-percentage [0,∞]> |
min-content |
max-content |
fit-content( <length-percentage [0,∞]> )

<length-percentage> =
<length> |
<percentage>

Values

  • length : puede ser en px, cm, in (píxel, centímetro o inches)
  • percentage : % especificado como un porcentaje de la altura del bloque contenedor.

Examples

table {min-height: 75%;}

form {min-height: 0;}

Notes

min-height tiene prioridad sobre los valores max-height y height.

Especificaciones

Specification
CSS Box Sizing Module Level 3
# width-height-keywords
CSS Box Sizing Module Level 4
# sizing-values

Compatibilidad con navegadores

BCD tables only load in the browser

Ver también