CSS padding in header - HTML CSS CSS Property

HTML CSS examples for CSS Property:padding

Description

CSS padding in header

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
header {<!--   w w  w .  ja v  a 2 s .  c om-->
   width:100%;
   position:relative;
   background:Chartreuse;
   padding:31px 0 31px 0;
}

h1 {
   text-align:center;
   color:yellow;
   position:relative;
   display:block;
}
</style> 
 </head> 
 <body> 
  <header> 
   <h1>Lorem ipsum d</h1> 
  </header>  
 </body>
</html>

Related Tutorials