Extended styling of Nice menus module

Tmanagement - September 14, 2006 - 10:54

Hi all,

I looked at the nice menus module and although it seems to work fine I am running into a design/programming problem so it seems. Searching the internet en drupal.org only give basic css styling.

When you create a menu you have to give a parent under which you can add menu items. Nice menus is only working on the item which you put under parent and further. This means that the menu will not open when hover over the menu title/parent, instead it is already open because nice menu is working with the first item under the parent.

The problem with this is that you can style only the link items and therefore you have limitations. In my design I have a navigationbar which is 50px high. I would like to display the menu title/parent on that bar and when hover over it I would like to see the nice menus module got to work. This will give me freedom to style the menu title/parent separately from the rest of the dropdown module.

My goal:
When hover over the menu title in the navbar which is 50px I want to turn the background of that title/parent item lighter then normal.

I think it is impossible to do so without any programming and if so what should be the road to follow.

that sounds like what we did

Roger López - September 14, 2006 - 13:52

that sounds like what we did on http://montessorihouseforchildren.com/.

basically you need to provide styles for all of the following items:

#main-nav - div containing nice-menus block (change name to whatever your container is called)

#main-nav li - all menu items
#main-nav li li - all menu items except the top level
#main-nav li#menu-77 - menu item with menu id 77

#main-nav a - text links for all menu items
#main-nav li li a - text links for all menu items except the top level

#main-nav li:hover, #main-nav li.over - menu item rollover state
#main-nav li:hover a, #main-nav li.over a - menu item text link during rollover state

#main-nav li a.active - active menu item text link

Hope this helps

Brilliant! Thanks for your

Tmanagement - September 16, 2006 - 15:48

Brilliant!

Thanks for your reply. Just before I read your post I figured that it should be possible as you explained. And your site was the best proof one could wish. I must say that your site is one of the best Drupal designs I have seen. Is it already in the showcase here?

Not Yet

Roger López - September 19, 2006 - 03:50

We are just getting on a roll now with drupal and we actually have several really nice sites that we will start showcasing soon, here and on drupalsites.

 
 

Drupal is a registered trademark of Dries Buytaert.