Header Background Color Covering Entire Width of Page - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Header Background Color Covering Entire Width of Page

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
* {<!--  ww  w  .j a v a  2  s .  c  o m-->
   margin: 0;
   padding: 0;
}
body
{
   background-color: #0077BE;
}
header
{
   width: 100%;
   background-color: #1C39BB;
   color: white;
}


      </style> 
 </head> 
 <body translate="no"> 
  <header> 
   <h1>Welcome to portfolio!</h1> 
   <center> 
    <ul class="navList"> 
     <li class="navButton" a href="index.html"> Home </li> 
     <li> 
      <div class="dropdown"> 
       <button class="dropbtn">Portfolio Items</button> 
       <div class="dropdown-content"> 
        <a href="programPage.html">Programs</a> 
        <a href="otherProjects.html">Other Projects</a> 
       </div> 
      </div> </li> 
     <li class="navButton" a href=""> Video Interviews </li> 
    </ul> 
   </center> 
  </header>  
 </body>
</html>

Related Tutorials