Centering header with logo and navigation bar - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Centering header with logo and navigation bar

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">

body, html {
   width: 100%;
   height: auto;
   margin: 0;
}
.container {<!--   ww  w . j a v a  2s. com-->
   background: #333;
   width: 1000px;
   margin: auto;
   text-align: center;
}
.header_left {
   float: left;
   margin-left: 70px;
   margin-top: 12px;
}
.navi {
   float: right;
   margin-right: 60px;
}
.navi li {
   list-style: none;
   display: inline;
}


      </style> 
 </head> 
 <body id="home"> 
  <div id="header"> 
   <div class="container"> 
    <div class="header_left"> 
     <a href="#"> <img src="https://www.java2s.com/style/demo/InternetExplorer.png" width="208" height="69"> </a> 
    </div> 
    <div class="header_right"> 
     <ul class="navi"> 
      <li> <a href="#"> <img src="https://www.java2s.com/style/demo/Google-Chrome.png" width="88" height="56"> </a> </li> 
      <li> <a href="#"> <img src="https://www.java2s.com/style/demo/InternetExplorer.png" width="88" height="56"> </a> </li> 
      <li> <a href="#"> <img src="https://www.java2s.com/style/demo/InternetExplorer.png" width="88" height="56"> </a> </li> 
      <li> <a href="#"> <img src="https://www.java2s.com/style/demo/Opera.png" width="88" height="56"> </a> </li> 
     </ul> 
     <div style="clear: both"></div> 
    </div> 
   </div> 
   <div id="content"></div> 
   <div id="footer"></div> 
  </div>  
 </body>
</html>

Related Tutorials