Welcome Guest Search | Active Topics | Sign In | Register

Centre a menu Options
Robert Field
Posted: Tuesday, June 10, 2008 10:22:00 AM
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..
eo_support
Posted: Tuesday, June 10, 2008 10:39:35 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
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
Robert Field
Posted: Thursday, June 12, 2008 7:18:37 AM
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.
eo_support
Posted: Thursday, June 12, 2008 10:59:14 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.