Style for first table column except first cell of that column - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Style for first table column except first cell of that column

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:first-child {<!--   w w w .j a va 2s.  c  o m-->
   background:yellow;
}

td[colspan] {
   background:transparent;
}
</style> 
 </head> 
 <body> 
  <table class="census"> 
   <caption>
     Lorem ipsu 
   </caption> 
   <tbody> 
    <tr> 
     <td colspan="2" class="chart">Lorem ipsum dolor sit amet, conse</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsu</td> 
     <td>Lorem ips</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsu</td> 
     <td>Lorem ips</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsu</td> 
     <td>Lorem ips</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsu</td> 
     <td>Lorem ips</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsu</td> 
     <td>Lorem ips</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials