Overlap an element in the middle of 2 different columns - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Overlap an element in the middle of 2 different columns

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 {
   height: 100%;
}
.wrapper {<!--from ww w  .  j av a2  s. c  om-->
   position: relative;
   height: 100%;
}
.left, .right {
   float: left;
   width: 50%;
   text-align: center;
   height: 100%;
}
.left { background-color: yellowgreen; }
.right { background-color: olive; }
.logo {
   height: 100px;
   width: 100px;
   background: white;
   position: absolute;
   top: 50%;
   left: 50%;
   margin: -50px 0 0 -50px;
}


      </style> 
 </head> 
 <body> 
  <div class="wrapper"> 
   <div class="logo">
     LOGO 
   </div> 
   <div class="left">
     THIS IS LEFT 
   </div> 
   <div class="right">
     THIS IS RIGHT 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials