HTML CSS examples for CSS Widget:Table Row
Hover on table row
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .hoverTable {<!-- ww w. j a v a 2 s. c om--> border-collapse:collapse; table-layout:fixed; } .hoverTable td { padding:8px; border:2px solid Chartreuse; } .hoverTable tr { background:yellow; } .hoverTable tr:hover { background-color:blue; } .hoverTable th { background:pink; } </style> </head> <body> <table class="hoverTable"> <tbody> <tr> <th colspan="3">Lorem ipsum do</th> </tr> <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';"> <td>Lorem ipsum dolor sit amet, consecte</td> <td>Lorem i</td> <td>Lorem i</td> </tr> <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';"> <td>Lorem i</td> <td>Lorem i</td> <td>Lorem i</td> </tr> <tr> <th colspan="3" class="width: 100%;">Lorem ipsum do</th> </tr> <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';"> <td>Lorem i</td> <td>Lorem i</td> <td>Lorem i</td> </tr> <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';"> <td>Lorem i</td> <td>Lorem i</td> <td>Lorem i</td> </tr> <tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';"> <td>Lorem i</td> <td>Lorem i</td> <td>Lorem i</td> </tr> </tbody> </table> </body> </html>