Dear friends I want to change the background color of a cell on mouse over it. So I would like to know what is the code for the same I mean to say as soon as I take the mouse pointer on the cell its background color should be changed and as soon as the mouse pointer is again moved back then it should be the same as previous.
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Onmouseover In <td> How To
Started by contactskn, Nov 29 2009 09:21 AM
2 replies to this topic
#2
Posted 29 November 2009 - 10:42 AM
You use this in a css file:
:hover, :focus and :active ensure compatibility with most browsers. But please, please don't use tables, they are horrible.
CSS
td {
background: white;
color: black;
}
td:hover, td:active, td:focus {
background: black;
color: white;
}
:hover, :focus and :active ensure compatibility with most browsers. But please, please don't use tables, they are horrible.
Edited by Baniboy, 29 November 2009 - 10:43 AM.
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users















