CSS table nth child() for last td - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

CSS table nth child() for last td

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">
.moduletablehome {<!--from ww w  . jav  a  2 s.c  o  m-->
   padding:31px;
}

table {
   border:0 none;
   border-collapse:collapse;
   width:100%;
}

.moduletablehome table tbody tr td:nth-child(odd) {
   border-bottom:2px dotted;
   border-right:2px solid;
}

.moduletablehome table tbody tr td:nth-child(even) {
   border-bottom:2px dotted;
}
</style> 
 </head> 
 <body> 
  <div class="moduletablehome"> 
   <table border="0" cellpadding="122px" cellspacing="12px" width="80%"> 
    <tbody> 
     <tr> 
      <td align="center" width="12%">L</td> 
      <td align="center" width="12%">L</td> 
     </tr> 
     <tr> 
      <td align="center" width="12%">L</td> 
      <td align="center" width="12%">L</td> 
     </tr> 
     <tr> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials