Controlling Spacing Between Table Cells - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Controlling Spacing Between Table Cells

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">
table.test td {
   background-color:Chartreuse;
   margin:13px 13px 13px 13px;
   padding:13px 13px 13px 13px;
}

table.test {<!-- www  .j a  v a2s  .c  om-->
   border-collapse:separate;
   border-spacing:11px;
   *border-collapse:expression('separate', cellSpacing = '11px');
}
</style> 
 </head> 
 <body> 
  <table class="test"> 
   <tbody> 
    <tr> 
     <td>Lore</td> 
     <td>Lore</td> 
     <td>Lore</td> 
    </tr> 
    <tr> 
     <td>Lore</td> 
     <td>Lore</td> 
     <td>Lore</td> 
    </tr> 
    <tr> 
     <td>Lore</td> 
     <td>Lore</td> 
     <td>Lore</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials