ScanSkill

max-width

The max-width property defines the maximum width of an element.

Syntax

max-width: value | none;

Example

.mydiv {
            border: 1px solid black;
            max-width: 150px;
        }
max-width

Property Values

value: sets the given value as the maximum width of the element.

none: sets no maximum height. (default value)