Remove border-spacing when there is no data in a table - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Border

Description

Remove border-spacing when there is no data in a table

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 {<!-- w  ww  . ja va  2s .  c o  m-->
   border-collapse:collapse;
}
</style> 
 </head> 
 <body> 
  <table border="1"> 
   <tbody> 
    <tr> 
     <td>Lorem ipsum d</td> 
     <td>Lorem ipsum d</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsum d</td> 
     <td>Lorem ipsum d</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials