highlight entire table cell on hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

highlight entire table cell on hover

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 {<!--from   ww  w  . j ava2s.c o m-->
   position:relative;
   line-height:61px;
}

td a, td span {
   position:absolute;
   top:0;
   left:0;
   right:0;
   bottom:0;
   text-decoration:none;
}

td a:hover {
   background:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <table align="" style="border: 0px solid #ffffff; background-color: #5e913f;" class="mceEditable" border="1" cellpadding="5" cellspacing="0" height="207.75" width="1060"> 
   <tbody> 
    <tr> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <a class="" title="Super" href=""> <span style="color: #ffffff;">Lorem</span> </a> </td> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <a class="" title="Super" href=""> <span style="color: #ffffff;">Lorem</span> </a> </td> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
    </tr> 
    <tr> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
    </tr> 
    <tr> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 250px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 0px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
     <td style="text-align: center; border: 5px solid #ffffff; width: 0px;"> <span style="color: #dddddd;">Lorem ipsu</span> </td> 
    </tr> 
   </tbody> 
  </table> 
  <p> <span style="color: #ffffff;">&nbsp;</span> </p>  
 </body>
</html>

Related Tutorials