|
Rank: Newbie Groups: Member
Joined: 6/10/2008 Posts: 2
|
I am using the menu module and I can not get it to centre.
Does anyone have any ideas or examples.
I have a div widht is 780px as a container for the menu. I want the menu to centre within this area. But it does not work. I have played with the CSS and placed a red 1px border around the top group and it is only 60% of the available width but will not centre. If i set it the centre by setting the text-align of the container the menu moves across to the right but goes way beyond the container.
I dont want to sound like an idiot but i have been toying with this for hours now.
Does anyone have any examples they can point me at..
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
Check the menu's Width property. If your menu's actually width is 500px but the Width's property is only set 200px, when you center it the browser will take the 200px literally. That might be what causing the problem for you. The solution is to set the menu's Width correctly.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 6/10/2008 Posts: 2
|
Ok, I can appreciate that and I will check the width.
The big issue is that this menu is generated as part of a CMS system so the width is not known. For example the initial menu may have 4 options and when the user log's in the backoffice section a new menu option is added for admin, with child options. There for the total width is not known.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi Robert,
In that case we are not aware of any way to reliably center the menu. The closest you can have is set the menu's TopLevelItemAlign to None. That will make the item to spread out instead of aligned to the left or to the right.
Sorry about that!
Thanks
|
|