[ 1 post ]

LucaC

  • Joined: Fri Jul 02, 2010 1:36 am
  • Posts: 9
  • Offline
  • Profile
Tags:

How to add a CSS class to a parent menu item?

Post Posted: Mon Jul 26, 2010 2:31 am
+0-
Hi,
Anyone knows how to add a new css class on a parent menu item?
I'd like to add the css class "active" to the parent menu when a submenu item is active.

YUI menu generates an "active" class in the right way but i want to add the "actve" class to the parent menu when the subitem is active

For example, in a menu structure like this:

PRODUCTS
---IMAC
---IPOD

when ipod or imac is actve I'd like Pruducts to have css class active as well so it can be highlighted.

In practical terms:

This is the way it looks now when i am in "ipod" page (HTML css class atribute in parentesis where css class "active" has value=text-decoration:capitalized).

Products (<a class="[b]yuimenubaritemlabel yuimenubaritemlabel-hassubmenu
" >
---imac (<a class="yuimenubaritemlabel yuimenubaritemlabel-hassubmenu" >)
---IPOD (<a class=active yuimenuitemlabel">)

This is the way I'd like to look
PRODUCTS <a class=active yuimenuitemlabel">
---imac <a class="yuimenubaritemlabel yuimenubaritemlabel-hassubmenu")
---IPOD (<a class=active yuimenuitemlabel">)


I hope my explanation is clear enough.
I am really stuck on this and I really need help!!!!

Thanks
  [ 1 post ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum