Remove margins between container for border-spacing - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Border Style

Description

Remove margins between container for border-spacing

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>

div {<!--from  www  . jav a 2  s. c o m-->
   background: grey;
}
ul {
   padding: 0;
   list-style-type: none;
   display: table;
   table-layout: fixed;
   width: 100%;
   padding-top: 5px;
}
li {
   display: table-cell;
   background: gold;
   border-left: 5px solid grey;
}
li:first-child{
   border-left: none;
}


      </style> 
 </head> 
 <body translate="no"> 
  <div> 
   <ul> 
    <li>1</li> 
    <li>2</li> 
    <li>3</li> 
   </ul> 
   <p>Other content </p> 
  </div>  
 </body>
</html>

Related Tutorials