CSS max-width Property Reference

The CSS max-width property is a standard property in CSS Box Sizing. Review its formal syntax, computed behavior, and practical declarations.

CSS max-width Property Reference

The CSS max-width property is a standard property in CSS Box Sizing. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

max-width overview

The CSS max-width property is a standard property in CSS Box Sizing. Review its formal syntax, computed behavior, and practical declarations.

The property is not inherited by default. Use an explicit global keyword when inheritance is intended.

Syntax and formal definition

max-width formal syntax
FieldValue
Formal syntaxnone | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>
Initial valuenone
Applies toallElementsButNonReplacedAndTableRows
InheritedNo
PercentagesreferToWidthOfContainingBlock
Computed valuepercentageAsSpecifiedAbsoluteLengthOrNone
Animation typelpc
Mediavisual
Specification groupCSS Box Sizing
StatusStandard

Practical examples

These declarations demonstrate valid ways to set max-width. The initial and inherit global keywords remain available even when a property-specific value is preferable.

max-width live example
CSS .reset-example { max-width: initial; } .inherit-example { max-width: inherit; } @supports (max-width: initial) { .supported { max-width: initial; } }

Description

The CSS max-width property is a standard property in CSS Box Sizing. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: max-width
  2. MDN: CSS Properties Reference

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies