Collapse CSS borders - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Border Style

Description

Collapse CSS borders

Demo Code

ResultView the demo in separate window


<html>
 <head> 
  <meta name="viewport" content="width=device-width"> 
  <style>

#grandbox<!--from ww w .j  a v  a  2 s. c om-->
{
   position: relative;
   width:204px;
   height:204px;
   border: solid thin black;
   left:40%;
   top: 8%;
}
div.smallbox
{
   border: solid thin black;
   text-align: center;
   position:absolute;
   width: 100px;
   height: 100px;
   float: left;
   line-height: 100px;
}
div.sb1{
   top:0;
   left:0;
}
div.sb2{
   top:0;
   right:0;
}
div.sb3{
   left:0;
   bottom:0;
}
div.sb4{
   right:0;
   bottom:0;
}

      </style> 
 </head> 
 <body> 
  <div id="grandbox"> 
   <div class="smallbox sb1"> 
   </div> 
   <div class="smallbox sb2"> 
   </div> 
   <div class="smallbox sb3"> 
   </div> 
   <div class="smallbox sb4"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials