Little Web Hut

CSS 2.1 Reference: min-width Property

CSS min-width Property
Syntax
selector {min-width: value ;}
Usage

The min-width property is used to specify the minimum width of the content area of an element's box. (See CSS Box Model for information concerning the boxes that are generated for elements.) The min-width property does NOT include the width of the padding, border, or margin areas.

This property is specified by using a length, percentage, or keyword, according to the syntax shown above. Negative values are not permitted. If a percentage value is used, the value will be a percentage of the containing block.


CSS Example: The min-width property is set using a length value.
  p {min-width: 200px; background-color: yellow;}
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style

Keywords
  • inherit - The inherit keyword is used to specify that the value for this property should be taken from the parent element. If inherit is used with the root element, then the initial value for this property will be used.
Applies To In general, this property applies to block-level elements and replaced elements.
Inherited No
Initial Value 0


min-width Property Examples
Test It HTML StyleTest It HTML StyleTest It HTML5 StyleThe min-width property is set using a length value.