Log in

View Full Version : Resolved Need help with All Levels Navigational Menu (v3.0)



zeech26
06-29-2011, 06:46 PM
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

ddadmin
06-30-2011, 04:51 AM
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:


.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

zeech26
06-30-2011, 06:28 PM
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