Padding and margin usage - HTML CSS CSS Property

HTML CSS examples for CSS Property:padding

Description

Padding and margin usage

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
html {<!--from   w w  w .  j a  v  a  2  s  .  c om-->
   height:100%;
}

body {
   margin:0;
   height:100%;
}

.box {
   padding-top:2px;
   height:100%;
   background-color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <div class="box"> 
   <p>Lorem ipsum dolor si</p> 
   <p>Lorem ipsum dolor si</p> 
  </div>  
 </body>
</html>

Related Tutorials