Center the menu

grosbedos - May 3, 2008 - 18:45
Project:YUI Menu
Version:5.x-2.4
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

I would like to know, how center the menu.
I've install yuimenu in the garland theme, just after the header region.

The yuimenu appear on top of the page, good. But menu items are left align, is it possible to center that?

Thanks a lot.

#1

drupalhizmetleri - May 4, 2008 - 09:12

you have to add the following line in the proper element (for example find the ".yui-skin-sam .yuimenuitemlabel" element in your menu.css file) in your menu.css file.
text-align :center;
This will center all menu items.

#2

grosbedos - May 5, 2008 - 07:51

Thanks for your reply.
But i have not good explain what i want.

I would like to center the entire menu.

I have attached two screenshot, it would be self explain now. (i think)

Thanks for your help.

AttachmentSize
whatIHave.jpg 104.5 KB
whatIWant.jpg 104.53 KB

#3

helmi03 - March 4, 2009 - 12:27

This issue related to how you style your page and not specific to yuimenu module.

one way is wrap you menu div into another centered div. Let say menu in div id="productsandservices".

<div id="wrapper" align="center">
<div id="productsandservices"></div>
</div>

or, some other references:
* http://css-discuss.incutio.com/?page=CenteringBlockElement
* http://www.maxdesign.com.au/presentation/center/

 
 

Drupal is a registered trademark of Dries Buytaert.