I've been fiddling around with this for ages and I'm truly stumped. Can anybody help?

Also, is there a way to make all menu boxes the same width, including the child drop-downs?

Lastly, Nice Menus will only appear when I'm logged in - it does not appear to anybody else.

Comments

watbe’s picture

Subscribing... I have exactly the same CSS problem, been working for about an hour, totally stumped as to how to get the horizontal menu centered...

My menus show up though, are you sure that your guests can view the menu/blocks?

vidmarc’s picture

This could be a great menu if there was a proper css help guide somewhere. I've also just added a few more child drop downs and these are hidden behind the blocks of the page. Yet another query!

add1sun’s picture

Status: Active » Closed (duplicate)

Please search all old issues first.
#275932: Center horizontal menus
#144734: Center horizontal menu block

CSS needs can be *wildly* varied. The few sites I know that use it didn't need anything beyond basic CSS color changes. The handbooks are open though and I am very open to folks documenting their solutions, so feel free to add any as you go along.

Re: the hidden behind issue, again if you search, there are *many* discussions about it and the various reasons that may happen along with various solutions. If someone would compile them and add them to the FAQ, that would be handy.

mingos’s picture

Yo. I used JS to do my centred NiceMenu. Check my comment here: http://drupal.org/node/99174#comment-2918096
Nice Menus could have something like this. If there was a way to just set alignment in the menu config, such a script might be triggered. Hope this helps a little.

twooten’s picture

I used the following in my local.css for the zen theme and the nice menus are centered nicely.

/*
* center the nice_menu
*/

#block-nice_menus-1 {
float: left;
position: relative;
left: 50%;
}

#block-nice_menus-1 ul.nice-menu-down {
position: relative;
left: -50%;
}

You'll need to change the CSS selectors to match the number of your block (#block-nice_menus-1).

Tim

kduryee’s picture

Issue summary: View changes

I'm not sure if Nice Menus changed its code in the last 4 or 5 years, but the underscores in the css above don't work now. This works for me currently:

/*
* center the nice_menu
*/

#block-nice-menus-1 {
  float: left;
  position: relative;
  left: 50%;
}

#block-nice-menus-1 #nice-menu-1 {
  position: relative;
  float: left;
  left: -50%;
}