Results 1 to 7 of 7

Thread: Need Second Drop Down to go with Anylink JS

  1. #1
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default Need Second Drop Down to go with Anylink JS

    1) Script Title: Anylink JS Dropdown menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm - though my script has some customizations from John Scheuer and updates to pass HTML5 validation

    3) Describe problem: Need a fast easy way to add drop down to one item on secondary menu on a page that is already using Anylink JS Drop Down Menu and Ajax content

    I had just finished perfecting the sample page for the client to meet their specs: http://www.floridaschoolbreakfast.org/twomenus.html. The secondary green menu looks exactly the way the want it to look, though they may change a few text items.

    Now they would like to have a drop down just on the Recipes item. I have already spent the last hour or two trying to have two anylink menus on the same page, but keep running into different problems with the hover colors and other things.

    Can anyone with more script knowledge tell me the best and fastest way to keep everything looking exactly the same while adding 2 drop down items to Recipes in the green menu?
    Thank you,
    Deborah
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Can you create a test page with the 2nd Anylink menu added to illustrate the issues you're having with it in terms of hover colors and "other issues"?
    DD Admin

  3. #3
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default

    Here is the test page I was working on: http://www.floridaschoolbreakfast.org/twomenus.html. I copied the menu files into a different folder since the two menus have different look and renamed most of the style classes, but it's messing up the look of the main site menu.
    Last edited by dmwhipp; 06-28-2015 at 03:52 PM.
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    So functionally the two menus work properly for you, just that the desired colors are not showing through? If the later this simply has to do with CSS principles of specificity and inheritance. You might try experimenting using the StyleSheet Editor found inside Developer's View of Firefox or Chrome to see how to get the desired colors to stick, using the !important keyword for example.
    DD Admin

  5. The Following User Says Thank You to ddadmin For This Useful Post:

    dmwhipp (06-29-2015)

  6. #5
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default

    Thanks - I've done exactly what you said. It's taken a bit of trial and error, but here is where I'm at now: http://www.floridaschoolbreakfast.org/twomenus.html

    The problem I'm having is with the background color on the second menu drop down item which is Recipes. The hover color on the Recipes tab is #262626 (dark gray, like the top menu). It's supposed to be #52c889 (light green, like all the second menu hovers). It is pulling selectedanchor from the first menu stylesheet -- I don't know what to edit to make the second menu pull the selected anchor class -- selectedanchortwo -- from the second menu stylesheet.

    Could you point me in the right direction to accomplish this?
    Thanks,
    Deborah
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  7. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Going back to what ddadmin said - "this simply has to do with CSS principles of specificity and inheritance" - you need to be more specific with your selectors.

    You've already discovered that the "selectedanchor" class is added to the "menuanchorclasstwo" class of the Recipes tab on hover, so why not try combining the selectors to increase specificity on the element?
    Code:
    .menuanchorclasstwo.selectedanchor { background: #52c889 !important }
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  8. The Following User Says Thank You to Beverleyh For This Useful Post:

    dmwhipp (06-29-2015)

  9. #7
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    264
    Thanks
    71
    Thanked 2 Times in 2 Posts

    Default

    Thank you Beverly. For some reason, I had added
    Code:
    .selectedanchortwo .menutwo { color:#fff !important; background:#52c889 !important; }
    I'm not even sure how I missed adding that style to .selectedanchor, but thank you for showing me the solution!
    Deborah
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

Similar Threads

  1. Replies: 1
    Last Post: 11-20-2014, 01:02 PM
  2. Replies: 3
    Last Post: 10-22-2010, 05:04 PM
  3. Anylink drop down menu - Demo #3 (sub menus drop to the right of anchor):
    By pjdcreative in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 06-17-2010, 02:54 AM
  4. AnyLink JS Drop Down Menu-drop down positioning problem g
    By BobMinkin in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 03-27-2009, 02:47 PM
  5. AnyLink Drop Down Menu/Anylink Css
    By wendyscountrycloset in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-04-2007, 04:07 PM

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
  •