Positioning A Circle In The Middle Of Two Divs - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Positioning A Circle In The Middle Of Two 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 {
   width:26%;
   height:100%;
   background-color:Chartreuse;
   position:fixed;
   left:0;
   z-index:2;<!--from   w  w w  . j a v  a  2s  .  c om-->
}

.right {
   width:26%;
   height:100%;
   background-color:yellow;
   position:fixed;
   right:0;
   top:0;
   z-index:2;
}

.centerc {
   text-align:center;
}

.circle {
   display:inline-block;
   height:100px;
   width:100px;
   border-radius:51px;
   background-color:blue;
   z-index:100;
}
</style> 
 </head> 
 <body> 
  <div class="left"> 
  </div> 
  <div class="centerc"> 
   <div class="circle"></div> 
  </div> 
  <div class="right"> 
  </div>  
 </body>
</html>

Related Tutorials