CSS Min-Width Property

In this chapter you will learn:
About min-width property
Values of this property
Example of this property

CSS min-width property is used to specify the minimum width of the element. If you want to fix the minimum width of the element then you can use this property.

Values of this property-
Values Description
length Used to specify the value in px, cm etc.
% Used to specify the value in % (percent)
initial Used to specify the default value of the property

Examples of this property-

<html>
<head>
    <title>Example of min-width property</title>
    <style type="text/css">
        table
        {
        min-width:40%;
        background-color:Yellow;
        } 
 
    </style>
    </head>
<body>
Minimum width of this table is 40% so you can't decrease it.<br/>
<table border="1px">
<tr><td>One</td></tr>
<tr><td>Two</td></tr>
<tr><td>Three</td></tr>
</table>
</body>
</html>

Output:-
example of min-width
SUMMARY
In this chapter you have learned about the min-width property so now you can use this property to set the minimum width of the element. Some other properties are given in next chapter so click on Next button to continue-
 

Share your thought