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.

It is documented as part of the CSS Box Sizing specification.

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

/* Syntax */
min-width: auto;
min-width: length-percentage;
min-width: min-content;
min-width: max-content;
min-width: fit-content;
min-width: calc-size;
min-width: anchor-size;

/* Global values */
min-width: inherit;
min-width: initial;
min-width: revert;
min-width: revert-layer;
min-width: unset;
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.

1+
1+
1+
12+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC