Board Logo

Centering Menus
[email protected] - 9/9/2002 at 05:14 PM

Can you tell me how I can go about centering menus on a page. I am particularly interested in centering a horizontal menu. I assume it involves writing a JavaScript wrapper. Can you point me to some sample code? Thanks.

tigra - 9/11/2002 at 07:30 AM

Take a look at Tigra Menu PRO FAQ:

Q: How to align menu on the center of the page?
A: Alignment feature is available from v2.0 of Tigra Menu PRO. You need to specify align parameter in menu geometry configuration file.

// Menu alignment - (left, center, right)
MENU_POS['align'] = 'center';


Q: How do you get the caption to be centered in a menu item?
A: Any html allowed within menu items so you are free to use something like

your caption

If same alignment is required for many items you may write simple wrapper.

dtails - 12/28/2002 at 12:51 PM

Hi Tigra,
I just bought the PRO version, as I would like to center my horizontal menu. Can this be done just be adding the lines:

// Menu alignment - (left, center, right)
MENU_POS['align'] = 'center';

in the menu_tpl.js part? If not, how should I do this?
I have already configured the free version of the menu to look as I would like it, so can I re-use must of the configuration, or must I start over with that part?
Thanx for your help,

tigra - 1/4/2003 at 03:40 PM

MENU_POS['align'] = 'center';
will center the menu on the page, but note that first value in MENU_POS['align'] will define offset from the page center. Negative values are ok if you want to offset to the left. Put 1 there if you want it just centered. Note2: you'll need to modify other menu files to conform Tigra Menu PRO configuration format. If you've created your current menu configuration using Online Menu Builder the you can just save your results for PRO version and specify alignment parameter.

Back to forum: