O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

min-width

Values:

<length> | <percentage>

Initial value:

0

Applies to:

All elements except inline nonreplaced elements and table elements

Inherited:

No

Percentages:

Refer to the width of the containing block

Computed value:

For percentages, as declared; for length values, the absolute length; otherwise, none

Description:

Defines a minimum constraint on the width of the element (the exact nature of that width is dependent on the value of box-sizing). Thus, the element can be wider than the declared value, but not narrower. Negative values are not permitted.

Example:

div.aside {float: right; width: 13em; max-width: 33%;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required