Results 1 to 3 of 3

Thread: Need help with All Levels Navigational Menu (v3.0)

  1. #1
    Join Date
    Mar 2008
    Posts
    46
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Need help with All Levels Navigational Menu (v3.0)

    Hello, I am looking for help with the All Levels Navigational Menu (v3.0)
    http://www.dynamicdrive.com/dynamici...menu/index.htm

    My boss has asked my to modify so that when you land on a page, you know where you are, hence the underline in the dropdown which I achieved with a background image (see here: http://contentx.com/EDI/drivetrains.html )
    I used this in my CSS to add a class the the a tag:

    .mattblackmenu li a.selected{
    background:url(../img/blue_border.png);
    background-repeat:repeat-x;
    background-position:bottom;
    }

    The problem is that when you roll over the menu, you then lose the blue bar, as though it resets it. I tried to make the LI class "selected" but no dice.
    Also, when you click on the top link of the dropdown, the entire menu below goes blank.

    Any hints? Ideas?
    Thanks in advance
    zeech
    Last edited by zeech26; 06-30-2011 at 06:28 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,878
    Thanks
    3
    Thanked 962 Times in 951 Posts
    Blog Entries
    15

    Default

    The CSS class "selected" should only be used to style the temporarily active main menu item, as the script dynamically adds and removes this class depending on which menu item the mouse is currently over. What you should do is create another CSS class for the purpose of styling the menu item that corresponds to the current page, and add that class inside that menu item's markup. For example:

    Code:
    .mattblackmenu li a.selected, .mattblackmenu li a.currentpage{
    background:url(../img/blue_border.png);
    background-repeat:repeat-x;
    background-position:bottom;
    }
    BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: http://www.dynamicdrive.com/notice.htm
    DD Admin

  3. #3
    Join Date
    Mar 2008
    Posts
    46
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your feedback, that worked beautifully!
    PS: Sorry about the script removal, my boss stripped it out.
    I have put it back in and we re-upload shortly.
    cheers
    zack

Bookmarks

Posting Permissions

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