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-

More Articles

 

Share your thought



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.