SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast ericdgreene's Avatar
    Join Date
    Nov 2011
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about custom menu (multiple highlighted nav items)

    I have a custom menu with most of the top nav items dropping down to various pages in the site.

    I also need to have it so that some pages are found in more than one drop-down menu.

    Problem is, when you land on one of those pages, the custom menu highlights both parent nav items as being current.

    Here is a basic example. If I have:

    HTML Code:
    <ul>
    <li>Top Item 1
      <ul><li>Page A</li></ul>
      <ul><li>Page B</li></ul>
    </li>
    <li>Top Item 2
      <ul><li>Page C</li></ul>
      <ul><li>Page D</li></ul>
      <ul><li>Page E</li></ul>
    <li>
    <li>Top Item 3
      <ul><li>Page A</li></ul>
      <ul><li>Page D</li></ul>
    </li>
    </ul>
    See how both Page A and Page D are part of two menu drop downs?

    Let's say I click to go to Page A, what happens is both Top Item 1 and Top Item 3 will be both highlighted in the nav menu.

    I can't think of a way to force it to pick one Top Item over the other... One question is, which Top Item should be highlighted and which not highlighted? If it's possible, would there be a way to choose one to be highlighted over the other?

    Anyone have an idea or suggestion? TYIA

  2. #2
    SitePoint Zealot naynay99's Avatar
    Join Date
    Jan 2010
    Location
    Los Angeles
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    post the highlight code please. seems like you have to figure out if there is a way to target each individual button. would be nice to know.


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
  •