CSS min-width Property
Description
The min-width property establishes the smallest inline size an element’s box is allowed to have during layout. When the available space or other sizing rules would otherwise shrink an element, min-width prevents it from becoming narrower than the specified minimum, ensuring content, controls, or visual components remain usable and legible. It ties into the browser’s intrinsic sizing behavior: if an element’s content or intrinsic minimum size is larger than the computed minimum, that intrinsic requirement will still influence the final size, but the explicit min-width acts as a lower bound the layout engine cannot go beneath.
In practical layouts, min-width interacts with other sizing constraints. For example, an explicitly set width that is smaller than the minimum will be overridden by the minimum, and a max-width can cap expansion while leaving the minimum as a lower limit; the computed size is determined by resolving these constraints together. How the minimum is applied also depends on box measurement model: with box-sizing the interpretation of what constitutes the element’s width (content box vs border-box) changes whether padding and borders are inside or outside the minimum calculation. If an element cannot fit within the constrained space because of its minimum size, that can produce overflow, which is governed by the overflow behavior and may cause scrollbars or visual clipping.
In modern layout modules, min-width is especially important. Within a flex formatting context it acts as a constraint during the flex algorithm: an item’s minimum size can prevent it from shrinking below a usable threshold even when flex factors would otherwise reduce it, and it interacts with properties like flex-basis and the flex shrink/grow calculations to determine final sizes. Similarly, in responsive designs you can use a minimum to keep interactive controls tappable, stop text from reflowing awkwardly, or ensure images and replaced elements maintain a sensible minimum display size. Thoughtful use of min-width helps preserve usability and visual stability across varying viewport sizes and layout constraints.
Definition
- Initial value
- 0
- Applies to
- All elements except non-replaced inline elements and table elements
- Inherited
- No
- Computed value
- The percentage as specified or the absolute length
- Animatable
- Yes
- JavaScript syntax
- object.style.minWidth
Interactive Demo
Syntax
min-width: [ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content
Values
- <length>Specifies a fixed width. Negative values are not allowed.
- <percentage>A percentage relative to the width of the containing block. If the containing block has no width explicitly set then is is treated as none. Negative values are not allowed.
- max-contentThe max-content width or height.
- min-contentThe min-content width or height.
- availableThe containing block width or height minus margin, border, and padding.
- fit-contentIf the total available space is finite, equals to min(max-content, max(min-content, fill-available)). Otherwise, equal to the max-content measure. Requires CSS Intrinsic & Extrinsic Sizing Module support in browsers.
Example
Browser Support
The following information will show you the current browser support for the CSS min-width property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
