Tyanna
Newbie
Posts: 1
Registered: 10/6/2006
Member Is Offline
|
| posted on 10/6/2006 at 10:07 AM |
|
|
Menu Placement
I have made a menu using your software and it looks really good. The only problem with it I'm having is that it won't go where I want it to. It
always appears in the top left hand corner of the screen when I want it to appear in a cell of a table just above the main body of my site.
Here is a snipit of my code:
in the header:
function showMenu(){
src="scripts/menu.js"
src="scripts/menu_items.js"
src="scripts/menu_tpl.js"
new menu (MENU_ITEMS, MENU_TPL);
}
In the cell:
<tr>
<td bgcolor="#000000"><p>
<center><script>showMenu();</script></center>
</tr>
No matter what I do, it will not go there. Instead it is going overtop of my banner in the top left of the screen. It is rather annoying.
Can someone please tell me how to fix this?
|
|
|
ctgivens
Newbie
Posts: 1
Registered: 11/2/2006
Location: Springfield MO
Member Is Offline
|
| posted on 11/2/2006 at 08:47 AM |
|
|
Menu Placement
I just wondered if you had fixed this as I am having the same trouble.
Thanks in adavance
Charles
|
|
|
tigra
Administrator
Posts: 1982
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 11/2/2006 at 01:40 PM |
|
|
Free version of the menu only supports the absolute (coordinates based) positioning.
For relative positioning feature upgrade to Tigra Menu GOLD.
|
|
|
pingu123
Newbie
Posts: 1
Registered: 11/14/2006
Location: London
Member Is Offline
|
| posted on 11/14/2006 at 04:08 PM |
|
|
I have come up with a cheaper option! in the file menu_tpl.js add this to the top
//var windowWidth = window.innerWidth;
//var windowWidth = screen.width;
var windowWidth = document.body.clientWidth; // all other browsers needs 'window.innerWidth' firefox needs 'window.screenX'
var MENU_POS = [
{
// item sizes
'height': 24,
'width': 184,
// menu block offset from the origin:
// for root level origin is upper left corner of the page
// for other levels origin is upper left corner of parent item
'block_top': 108,
'block_left': (windowWidth-736)/2,
// offsets between items of the same level
'top': 0,
'left': 184,
This only works with IE. It works like this : windowWidth gets the window width and then in the 'block_left': part add (windowWidth- x)/2 where x is
the width of yoru webpage (assuming it is centred) This then changes the left pixel offset depending on the client window width. It does not refresh
id the browser is resized. I have also commented out some experiments to do with the client computer screen resolution.
|
|
|