CSS:min-width
From MDC
[edit] Summary
The min-width property is used to set the minimum width of a given element. It prevents the used value of the width property from becoming smaller than the value specified for min-width.
- Initial value: 0
- Applies to: block level and replaced elements
- Inherited: no
- Percentages: refer to the width of the containing block
- Media:
visual - Computed value:
[edit] Syntax
min-width: <length> | <percentage> | -moz-max-content | -moz-min-content | -moz-fit-content | -moz-available
[edit] Values
- length : can be in px, cm, in
- percentage : % specified as a percentage of containing block's width
- -moz-max-content : the intrinsic preferred width New in Firefox 3
- -moz-min-content : the intrinsic minimum width New in Firefox 3
- -moz-available : the containing block width minus horizontal margin, border, and padding New in Firefox 3
- -moz-fit-content : the same as
-moz-min-contentNew in Firefox 3
[edit] Examples
table{min-width: 75%;}
form{min-width: 0;}
[edit] Notes
min-width overrides both max-width and width.
[edit] Specifications
[edit] Browser compatibility
| Browser | Lowest Version |
|---|---|
| Internet Explorer | 6 |
| Netscape | 6 |
| Opera | 3.5 |