Remove top,right and bottom border on a table cells - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Remove top,right and bottom border on a 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">
.asktable {<!--   w  w w  . ja v  a 2s . c  o  m-->
   border-collapse:collapse;
}

.asktable th {
   padding:5px 9px;
   border:2px solid Chartreuse;
}

.asktable td {
   padding:5px 9px;
   border:2px solid yellow;
}

.asktable th.no-border-right {
   border-top:0;
   border-right:0 !important;
   border-bottom:0;
}

.asktable .no-border-right {
   border-top:0;
   border-right:0 !important;
   border-bottom:0;
}
</style> 
 </head> 
 <body> 
  <table class="asktable"> 
   <thead> 
    <tr> 
     <th>Lorem</th> 
     <th>Lorem</th> 
     <th class="no-border-right">Lorem ipsum do</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>L</td> 
     <td>L</td> 
     <td>Lorem ipsum do</td> 
    </tr> 
   </tbody> 
  </table> 
  <p> <br> </p> 
  <table class="asktable no-border-right"> 
   <thead> 
    <tr> 
     <th>Lorem</th> 
     <th>Lorem</th> 
     <th class="no-border-right">Lorem ipsum do</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>L</td> 
     <td>L</td> 
     <td>Lorem ipsum dol</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials