Board Logo

Tigra menu Pro > Tricky to center the menu
sergio93 - 1/27/2009 at 09:51 AM

Hi,
I'm using the Tigra Menu Pro (v2.1 06/26/2007). I managed to center the menu under the head banner for IE 7 and Firefox 3 bur it remaions a few pixels shifting. Overall, the menu is not centered at low resolution ( 1064X 768 ou 800X600).
> I've embed the menu in a DIV.
> I've set margin-left:auto and margin-right:auto the CSS with any result. Somebody has a solution ?

Thank's for your replies.


tigra - 1/28/2009 at 02:05 AM

the PRO version of the menu should be placed directly inside the <body> element, preferably before </body> tag.
It is possible to configure the menu so the coordinates are adjustment based on the browser detected.

For example in menu_tpl.js:

/* Tigra Menu PRO template structure */

var s_userAgent = navigator.userAgent.toLowerCase();
var b_IE = (s_userAgent.indexOf('msie ') != -1);

var MENU_TPL = {
'width': [150,190,190],
'height': [20,20,20],
'block_left': [(b_IE ? 7 : -11),0,190],
'block_top': [195,25,0],
'left': [120,0,0],
'top': [0,25,25],
'hide_delay': [500,500,500],
'expd_delay': [500,500,500],
'align': 'center',
'pixel_path': 'pixel.gif'
};

This code will result in 7px offset for IE and -11px for all other browsers.
In tricky layout consider using Tigra Menu GOLD version which supports the relative positioning.


sergio93 - 1/28/2009 at 10:14 AM

Thank's for your reply.
1) You write "menu should be placed directly inside the <body> element" . In which page ?
My site is based on PHP includes in the main page index.php:

<?php include('head.inc.php'); ?>


<?php
include('menu.html'); // Tigra Menu include
?>
etc.

2) My menu_tpl.js page has only one argument
var MENU_TPL = [
{
'width': 100,
'height': 24,
'left': 142,
'top': 0,

Do i need to modify the code you send me according this ?


tigra - 1/29/2009 at 01:14 AM

1. Place your include so the menu initialization appears right above </body> tag in the resulting HTML code.
2. Make sure you use Tigra Menu PRO (see menu.js for version information). The format of the file in your response is not valid for PRO version.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/