Wednesday, April 7, 2010

Highlight table row when on mouse

What does this do?
Its highlight the table row when your cursor on the row
This is using CSS not using javascript.

Put this thing in your css
<style type="text/css">

.tablestes tr:hover { background-color: lime; }

.tablestes td:hover { background-color: red; }

</style>


And inside the html. name the table class into "tablestes"
<table class="tablestes">

<tr><td>Row 1</td></tr>

<tr><td>Row 2</td></tr>

<tr><td>Row 3</td></tr>

</table>

No comments: