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
.
- Valor inicial: 0
- Aplicable a: elementos de tipo bloque.
- Heredable: no
- Porcentajes: se refieren a la anchura del bloque contenedor.
- Media:
visual
- Valor calculado:
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
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 GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
min-width | ||||||||||||
anchor-size() | ||||||||||||
auto | ||||||||||||
fit-content | ||||||||||||
fit-content() | ||||||||||||
max-content | ||||||||||||
min-content | ||||||||||||
stretch |
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.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.