Definition and Usage
The min-width property is used to set the minimum width of an element.
This prevents the value of the width property from becoming smaller than min-width.
Note: The value of the min-width property overrides both max-width and width.
| Default value: | 0 |
|---|---|
| Inherited: | no |
| Animatable: | yes, see individual properties. Read about animatable – Try it |
| Version: | CSS2 |
| JavaScript syntax: | object.style.minWidth=”400px” Try it |
CSS Syntax
min-width: length|initial|inherit;
Property Values
| Value | Description |
|---|---|
| length | Default value is 0. Defines the minimum width in px, cm, etc. |
| % | Defines the minimum width in percent of the containing block |
| initial | Sets this property to its default value. Read about initial |
| inherit | Inherits this property from its parent element. Read about inherit |
