...

View Full Version : Help with drop menu a:active problem please!



kan3xiao
06-04-2012, 05:44 AM
Hi...I have multi-column dropdown navigation menu that is working perfectly except for one small issue. I have set a:active so that the links will flash/change colors when clicked. The problem is, when I click a link in one of the lower level drop down menus, the main level link also changes colors, which I don't want.

The menu can be seen here. (http://www.timberflooringtools.com/navmenu2/navmenu.html)

There are two lines in the css for this:



#menu li:active a { color:#D2427B; } /* for the main level */
#menu li:hover div a:active { color:#D2427B; } /* for lower level */


If I remove the main level line, then lower levels work perfectly. However, some of the main menu items don't have dropdowns (the first 3), and they won't flash when clicked if I remove that line. If I leave them both in, when I click in the lower levels, the upper levels flash too. How can I change my code so that when a main level link is clicked, it flashes and when a lower level link is clicked, it flashes, but when I click a lower level link the main level link does not flash?

Any help would be greatly appreciated!

kan3xiao
06-04-2012, 04:13 PM
I solved my own problem. I changed this:



#menu li:active a { color:#D2427B; } /* for the main level */

to this:


#menu li a:active { color:#D2427B; } /* for the main level */


Everything works fine now. Thanks to anyone who spent time trying to help on this!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum