View Full Version : Resolved Help with CSS Horizontal Hover Menu

06-14-2009, 10:27 PM
1) Script Title: CSS Horizontal Hover Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/hover.htm

3) Describe problem: i want to add a css rule that will change the color of the current or active menu item when clicked. i want it to stay that color when it is clicked until another menu item is clicked.

i tried adding an a:active rule, but it is not working. i added it under the a:hover rule.

here's a link to the site.

you can see when you hover the menu item turns green. i want it to stay green when clicked.

06-16-2009, 08:24 AM
use a selected id in your css;

li#Selected a {color:##66CC33; }

and then for example on the 'trading' page go to your hover menu in your html, and then replace;

<li><a href="trading.html"> Trading</a></li>


<li id="Selected"><a href="trading.html"> Trading</a></li>

then just repeat on your other pages.

06-16-2009, 09:04 PM
thanks. that worked great!