Hover to highlight table row - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Row

Description

Hover to highlight table row

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">

html {<!--from w  w  w . ja  v  a2s. c o m-->
   font-size: 13px;
}
#data {
   border-collapse: separate;
}
td, th {
   padding: 4px 14px 6px;
   text-align: center;
}
th {
   font-weight: bold;
}
tr {
   outline: 1px solid #efefef;
}
tr:hover {
   outline: 1px solid #999;
}


      </style> 
 </head> 
 <body> 
  <table id="data"> 
   <tbody> 
    <tr> 
     <th>Column A</th> 
     <th>Column B</th> 
     <th>Column C</th> 
     <th>Column D</th> 
    </tr> 
    <tr> 
     <td>1</td> 
     <td>2.12</td> 
     <td>Jack</td> 
     <td>Bread</td> 
    </tr> 
    <tr> 
     <td>2</td> 
     <td>3.14</td> 
     <td>New York</td> 
     <td>Land</td> 
    </tr> 
    <tr> 
     <td>3</td> 
     <td>631.1</td> 
     <td>London</td> 
     <td>Peace</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials