Make div background color span entire width - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

Make div background color span entire width

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Test Page</title> 
  <style type="text/css">

#wrapper {<!--from   ww  w.  ja  v  a  2s  .c om-->
   width: 100%;
   margin: 0;
   padding: 0;
   background-color: #cfcfcf;
}
#container {
   width: 960px;
   margin: 0 auto;
}
#nav {
   height: 33px;
}


      </style> 
 </head> 
 <body> 
  <div id="wrapper"> 
   <div id="nav"> 
    <div id="container">
      test 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials