Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS min-width property


May 05, 2021 CSS Reference Manual


Table of contents


CSS min-width property


Set the minimum width of a paragraph:

P
{
min-width:1000px;
}

Try it out . . .

Description of property definition and use

The min-width property sets the minimum width of the element.

Note: Min-width properties do not include padding, borders, or margins!

Default: 0
Inherited: no
Version: CSS2
JavaScript syntax: object .style.minWidth="10px"


Browser support

The numbers in the table support the first browser version number of the property.

Attributes
min-width 1.0 7.0 1.0 2.0.2 4.0

The property value

Value Describe
length Defines the minimum width value of an element. Default: Depends on the browser.
% Defines the minimum width based on the percentage of block-level objects that contain it.
inherit Specifies that the value of the min-width property should be inherited from the parent element.


Related articles

CSS tutorial: CSS Dimension

CSS Reference Manual: max-width property