CSS Padding and width - HTML CSS CSS Property

HTML CSS examples for CSS Property:padding

Description

CSS Padding and width

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ip</title> 
  <style>
#container {<!--   www.  ja  v  a2  s.  c  om-->
   width:501px;
   border:2px solid Chartreuse;
}

#inside {
   padding:11px;
   width:100%;
   border:2px solid yellow;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="inside">
     Lorem ipsum do 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials