Table with blank spaces after nth cell - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Table with blank spaces after nth cell

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">
td {<!-- ww w . j a  v a 2s.  c  o  m-->
   border:2px solid Chartreuse;
}

td:nth-child(4n+4) {
   border:none;
   width:31px;
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td>Lore</td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td></td> 
     <!-- blank cell, no border --> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td></td> 
     <!-- blank cell, no border --> 
     <td>Lorem</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials