CSS Max-Width Property

CSS 1

CSS 2

CSS 3

No Yes Yes

Description

Specifies the maximum width to be used for an element.

Syntax

max-width: [value];

Possible values

  • [length]
  • [percentage]
  • none
  • inherit

Initial Value

None

Applies To

All elements except non-replaced inline elements and table elements

Inherited

No

Media

Visual

Example

h1 {max-width: 250px;}


View All CSS Properties