Collapse the borders of a set of <div> tags using CSS - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Border

Description

Collapse the borders of a set of <div> tags using CSS

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">

div.gridcontainer
{
   width: 76px;
   line-height: 0;
   border-right:1px solid black;
   border-bottom:1px solid black;
}
div.griditem<!--   w  w  w.j  av  a2  s.c  o  m-->
{
   display:inline-block;
   border-left:1px solid black;
   border-top:1px solid black;
   width: 18px;
   height: 18px;
}


      </style> 
 </head> 
 <body> 
  <div class="gridcontainer"> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
   <div class="griditem"></div> 
  </div>  
 </body>
</html>

Related Tutorials