Fixed Header width overflow - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Fixed Header width overflow

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{<!--  w w w.ja va 2s .  co  m-->
   margin:0;
   padding:0;
   color:white;
   background-attachment:fixed;
}
.container{
   width:80%;
   margin:0 auto;
   height:auto;
   position:relative;
}
.tc{
   position:fixed;
   width:54.5%;
   display:block;
}
.topbar{
   background:#F00;
}
.language{float: left;}
.tphone{float: left;}
.temail{float:left;}
#leftCol{
   float:left;
   background:#00F repeat;
   width:25%;
   position:fixed;
   height:100%;
}
#rightCol{
   background:#FFF repeat;
   width:68%;
   position:relative;
   height:auto;
   float:right;
}
.content{
   background:#39F;
   float:right;
   width:100%;
}
.footer{
   background:#9F3
   ;
}


      </style> 
 </head> 
 <body> 
  <div class="container"> 
   <div id="leftCol"> 
    <div class="sidebar"> 
     <div class="logo"> 
      <img src="https://www.java2s.com/style/demo/Google-Chrome.png" width="98%" height="17%"> 
     </div> 
     <nav> 
      <div class="nav"> 
       <ul class="main"> 
        <li>Home</li> About Us 
        <li> Services 
         <ul class="sub"> 
          <li>A</li> 
          <li>E</li> 
         </ul> 
         </li> D
        <li>P</li> 
        <li>C</li> 
       </ul> 
      </div> 
     </nav> 
    </div> 
   </div> 
   <div id="rightCol"> 
    <div class="tc"> 
     <div class="topbar"> 
      <div class="language">
        English | English
      </div> 
      <div class="tphone">
        123-505 6024
      </div> 
      <div class="temail">
        info@abc.com
      </div> 
      <div style="clear:both; width:100%;"></div> 
     </div> 
    </div> 
    <div class="content"> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
     <p>A</p> 
    </div> 
    <div style="clear:both; width:100%;"></div> 
    <div class="footer">
      footer footer footer footer footer footer 
      footer footer footer footer footer footer 
      footer footer footer footer footer footer 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials