CSS positioning 2 shifted columns - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

CSS positioning 2 shifted columns

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>CSS positioning 2 shifted colums</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

#header {<!--  www  . j a va2s .com-->
   background: red;
   height: 70px;
   border: 1px solid #000;
}

#white {
   background: #fff;
   float: left;
   margin: -30px 0 0 70px;
   width: 100px;
   height: 230px;
   border: 1px solid #000;
}

#green {
   background: green;
   overflow: hidden;
   height: 201px;
   border: 1px solid #000;
   border-top: 0;
   border-left: 0;
}

      </style> 
 </head> 
 <body> 
  <div id="header"></div> 
  <div id="white"></div> 
  <div id="green"></div>  
 </body>
</html>

Related Tutorials