Common border between two adjacent divs - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Border

Description

Common border between two adjacent 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">

#one, #two {<!--   w  ww .  j  ava 2s  .c o  m-->
   width: 100px;
   border: 1px solid black;
   display: inline-block;
}
#one {
   height: 200px;
}
#two {
   height: 100px;
   position: relative;
   left: -1px;
   background: white;
   border-left: none;
}


      </style> 
 </head> 
 <body> 
  <div id="one"></div> 
  <div id="two"></div>  
 </body>
</html>

Related Tutorials