min-width

Sets the minimum width of an element. It prevents the element from becoming narrower than the specified value, even if the content or container is smaller.

Quick example

.login-card {
  width: 100%;
  max-width: 400px;
  min-width: 320px;
  /* ensures the card doesn't shrink too much on very small screens */
}

Quick facts

Initial value
auto
Inherited
No
Applies to
all elements but non-replaced and table rows
Animation type
lpc

Values

autolength-percentagemin-contentmax-contentfit-contentcalc-sizeanchor-size

min-width Browser Support

Widely available Since 2015 96% global usage

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

Safe to use without fallbacks.

1+
1+
1+
12+
ESC