CSS min-width / max-width Property Explained
What the CSS min-width / max-width property does, with an example.
Published November 7, 2026
The CSS min-width / max-width property set the smallest and largest allowed width an element can have, regardless of its content or explicit width.
Key points
- Check browser compatibility on a resource like caniuse.com if targeting older browsers
Example
min-width: 200px;
max-width: 600px;