Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Help with drop menu a:active problem please!

    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.

    There are two lines in the css for this:

    Code:
    #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!
    Last edited by kan3xiao; 06-04-2012 at 06:49 AM.

  • #2
    New Coder
    Join Date
    Jun 2012
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I solved my own problem. I changed this:

    Code:
    #menu li:active a { color:#D2427B; } /* for the main level */
    to this:
    Code:
    #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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •