views:

241

answers:

1

Brain freeze here.

What I want to do is have the Suckerfish drop down menu link to be active on the current page in the drop down as well as the top item.

I.e. below, in the Articles menu item, I'd like to have the top item "Articles" active at the same time that either Categoryone or Categorytwo is active. (Archives is a single level menu item, included here just FYI.)

I have php set up to generate a body tag with the title of the page, so the body tag for the page Categoryone is <body id="Categoryone">

HTML:

<ul class="sf-menu">

<li id="Archives-menu" class="current"><a href="http://mydomain.com/archives/" title="Archives">Archives</a></li>

<li id="Articles"><a href="" title="Articles">Articles</a><ul>

<li id="Categoryone-menu" class="current"><a href="http://mydomain.com/categoryone/" title="Categoryone">Categoryone</a></li>
<li id="Categorytwo-menu" class="current"><a href="http://mydomain.com/categorytwo/" title="Categorytwo">Categorytwo</a></li></ul></li>

</ul>

CSS:

#Archives #Archives-menu a, #Categoryone-menu #Categoryone-menu a, #Categorytwo-menu #Categorytwo-menu a

{
color:#fff;
}

If I throw this in #Articles #Articles-menu a to try and make Articles active, then all the links in the drop down are active.

A: 

You have not given much info about that you are truing to do. But here is my guess: Your selector is off. Try this:

#Archives a , #Archives-menu a , .current
{
color:#fff;
}

Also remove the current class from those items and add it to the appropriate item dynamically when the user is on the right page. (Maybe Sukerfish does that for you?)

Armitage