programplug Logo




CSS Width

The CSS width property is allow to set the width of content in HTML element.
CSS Width Value

VALUES DESCRIPTION
length It define the width in pixles,centimeter etc.
inline It is used for the width of containing block in %.
auto It is used for default value and to calculate the width.
inherit It define the inherit property from its parent element.
initial It allow to set the property to its default value.
Example:


	 <!DOCTYPE html>
   <html> 
    <head>  
    <style>  
img.normal {  
    width: auto;  
}  
img.big {  
    width: 110px;  
}  
img.px {  
    height: 110px;  
    width: 120px;  
}  
 </style>  
 </head>   
 <body>  
 <img class="px" src="n-FORESTS-628x314.jpg" alt="logo"> 
 <img class="normal" src="n-FORESTS-628x314.jpg" alt="logo">  
 <img class="big" src="n-FORESTS-628x314.jpg" alt="logo">  

 </body> 
 </html> 
	


Output:

   
    
   
 logo 
logo
logo