Using CSS for solid color background across/between table cells - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Using CSS for solid color background across/between 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">
table {<!--from   w w  w. j  ava  2 s  .  c om-->
   border-collapse:separate;
}

tr:first-child td {
   background-color:Chartreuse;
   border-spacing:0;
}

td {
   padding:11px 41px;
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td>Lorem ip</td> 
    </tr> 
    <tr> 
     <td>Lore</td> 
     <td>Lore</td> 
     <td>Lore</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials