min-width

The min-width CSS property sets the minimum width of an element. It prevents the used value of the width property from becoming smaller than the value specified for min-width.

Initial value auto
Applies to all elements but non-replaced inline elements, table rows, and row groups

Syntax

  
min-width: 30em;
  

Values

Defines the min-width as an absolute value.
Defines the min-width as a percentage of the containing block's width.
The browser will calculate and select a min-width for the specified element.
The intrinsic preferred min-width.
The intrinsic minimum min-width.
Uses the fit-content formula with the available space replaced by the specified argument, i.e. min(max-content, max(min-content, argument)).

Browser support

min-widthchrome1edge12firefox1ie7opera4safari1
autochrome21edge12firefox34ieopera12.1safari
fit-contentchrome46edge79firefox3ieopera33safari11
max-contentchrome46edge79firefox66ieopera33safari11
min-contentchrome46edge79firefox66ieopera33safari11
stretchchrome22edge79firefoxieopera15safari

We use cookies to improve your experience. Learn more in our Privacy policy.

×