Border around container - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Border Style

Description

Border around container

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

.container<!--from ww  w.j  ava2s. co m-->
{
   border:1px solid black;
   display:table;
}
.container DIV
{
   width: 15px;
   border: 1px solid Blue;
   margin: 1px;
}


      </style> 
 </head> 
 <body> 
  <div style="width: 200px;" class="container"> 
   <div style="float: left;">
     1 
   </div> 
   <div style="float: left;">
     2 
   </div> 
   <div style="float: left;">
     3 
   </div> 
   <div style="float: left;">
     4 
   </div> 
   <div style="float: right;">
     5 
   </div> 
   <div style="float: right;">
     6 
   </div> 
   <div style="float: right;">
     7 
   </div> 
   <div style="float: right;">
     8 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials