Overlapping divs - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div

Description

Overlapping divs

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">
#left-col {
   width:51px;
   position:fixed;
   background:yellow;
   left:0;
   top:0;
}

#container {<!--  www.j  av a 2 s  . co  m-->
   margin-left:51px;
   background:black;
}

#header {
   background:green;
}

#main {
   background:blue;
   position:relative;
}

#sidebar {
   float:right;
   top:0;
   right:0;
   width:51px;
   background:pink;
}

#footer {
   background:red;
   clear:both;
}
</style> 
 </head> 
 <body> 
  <div id="left-col">
    Lorem ipsu 
  </div> 
  <div id="container"> 
   <div id="header">
     Lorem ip 
   </div> 
   <div id="main"> 
    <div id="sidebar">
      Lorem ipsum dolor sit ame 
    </div>Lorem 
   </div> 
   <div id="footer">
     Lorem ip 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials