min-width

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

* Some parts of this feature may have varying levels of support.

Sumario

La propiedad min-width se usa para determinar la anchura mínima de un elemento. Previene que la propiedad width pueda ser inferior que min-width.

Sintaxis

min-width: <longitud> | <porcentaje> | -moz-max-content | -moz-min-content | -moz-fit-content | -moz-available

Valores

  • length : puede ser expresado en px, cm, in
  • percentage : expresado con "%" es un porcentaje del ancho del elemento contenedor.
  • -moz-max-content : el ancho intrínseco preferido
  • -moz-min-content : el ancho intrínseco mínimo
  • -moz-available : el ancho del contenedor menos el margen horizontal, borde y padding
  • -moz-fit-content : igual que -moz-min-content

Ejemplos

table{min-width: 75%;}

form{min-width: 0;}

Notas

min-width sobrescribe los valores de max-width y width.

Especificaciones

Specification
CSS Box Sizing Module Level 3
# min-size-properties
CSS Box Sizing Module Level 4
# sizing-values

Compatibilidad con navegadores

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
min-width
anchor-size()
Experimental
auto
fit-content
fit-content()
Experimental
max-content
min-content
stretch
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
User must explicitly enable this feature.
Uses a non-standard name.
Requires a vendor prefix or different name for use.
Has more compatibility info.

Ver también