min-width

min-width

CSS min-width Property
The CSS min-width property is used to specify the minimum width an element should be. Use with max-width to create a width range for the element.
The example below creates a width range in which the element cannot be less than 300px wide, and cannot be more than 400px wide. To see the effect run this code in a new document, and resize your browser window horizontally.
CSS CODE EXAMPLE
<!DOCTYPE html>
<style type="text/css">
#myDiv {
    min-width: 300px;
    max-width: 400px;
    background: #FFCAFF;
    height: 120px;
}
</style>
<div id="myDiv">Div content ...</div>
 
Div content ...

Possible Values:

number
Example: "200px"

percentage
Example: "25%"

none
Example: "none"

0 Response to "min-width"

Post a Comment