Skip to main content
Inspiring
February 26, 2009
Question

Spry Menu - Multiple Instances with different styles?

  • February 26, 2009
  • 1 reply
  • 561 views
Hi, I am using Spry horizontal menus in my site. Works nicely with one menu on the page. However, I require two horizontal menus on one page, each with different menu styles. Is this possible? If so, how do I achieve this?

It seems that the Spry code references only one style sheet?

Thanks,
Geoff
This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Inspiring
February 26, 2009
"GmR" <webforumsuser@macromedia.com> wrote in message
news:go667d$848$1@forums.macromedia.com...
>
> It seems that the Spry code references only one style sheet?


Each menu bar has a unique ID, so your second menu will probably be
called MenuBar2. Create new style rules for the second menu by using
descendant selectors like this:

#MenuBar2 ul.MenuBarHorizontal {
/* New styles here */
}

You don't need to create a complete set of new rules. For example, if
all you want to do is change the colour of the menu items, you can
just do this:

#MenuBar2 ul.MenuBarHorizontal a {
color: red;
}

#MenuBar2 ul.MenuBarHorizontal a:hover,
#MenuBar2 ul.MenuBarHorizontal a:focus,
#MenuBar2 ul.MenuBarHorizontal a.MenuBarItemHover,
#MenuBar2 ul.MenuBarHorizontal a.MenuBarItemSubmenuHover,
#MenuBar2 ul.MenuBarHorizontal a.MenuBarSubmenuVisible {
color: green;
}

--
David Powers
Adobe Community Expert, Dreamweaver
http://foundationphp.com