ahi
07-25-2007, 06:50 PM
Hi,
I'm looking for a CSS/JavaScript solution for changing the color of a menu item on clicking.
I already have a menu created using CSS.
It is displayed in a DIV with "a:hover" style defining what color the menu item should be displayed in, when the "mouse over" event occurs.
Now, I want the color of the menu item to change when the user selects that menu item. I cannot use a:visited, because each menu item displays a different page, and ONLY the menu item selected, must display YELLOW background to indicate that the user is on that page. Any generic CSS/JavaScript code will be greatly appreciated.
Thanks
Ahi
I'm looking for a CSS/JavaScript solution for changing the color of a menu item on clicking.
I already have a menu created using CSS.
It is displayed in a DIV with "a:hover" style defining what color the menu item should be displayed in, when the "mouse over" event occurs.
Now, I want the color of the menu item to change when the user selects that menu item. I cannot use a:visited, because each menu item displays a different page, and ONLY the menu item selected, must display YELLOW background to indicate that the user is on that page. Any generic CSS/JavaScript code will be greatly appreciated.
Thanks
Ahi