View Full Version : Help with Jim's DHTML Menu V5.7, centered and pictures

10-29-2004, 11:57 PM
The site I am working on now needs to have the menu centered not in a fixed position. I have tried centering this one but must be doing something wrong. Is there a code that nulls out the pixed position and lets the thing be centered?

The menu I really have been drooling over and am trying to replicate is located here: http://ktis.nwc.edu/page.php

10-30-2004, 06:29 AM
Read the file in the install directory called tutorial.htm, this is your answer from it:

Description for function menu.floatMenu()

Invoke this function to float the main menu, so it remains relatively positioned on the page (see "example3.htm" for demo). Here's an example:

menus[0].floatMenu(1024, 768, 10, 0);

1024 is the base screen width (i.e. the screen width the menu was originally positioned on) and the 768 is the corresponding screen height. The 0 is how you want the menu's positioned (i.e. horizontally, vertically or both [0, 1, 2]).


10-30-2004, 11:48 AM
I thought I had gone through the whole tutorial loking for this info, but I guess I missed it.

Thanks for your help!!

Mike Gibbs
01-28-2005, 01:44 PM
I've had this problem. When I used 1024 x 768 upwards, the float worked fine. However when I switched to 800 x 600 it went awry.

I resolved the issue by switching to screen resolution 800 x 600 then editing config.js so that the menu was positioned correctly, then updated the float command to menus[0].floatMenu(800, 600, 10, 0).

This works fine. The menu remained constant at 800 x 600, 1024 x 768 and upwards. It seems that if you edit at a lower screen size it resolves the problem.

Mike Gibbs.

Mike Gibbs
06-07-2005, 10:22 AM
Oh oh, now with the introduction of Firefox browser the horizontal plane of the floating menu seems to indent several pixels. Any answers???

06-07-2005, 07:45 PM
I am assuming here that NS7.2 will react just like Firefox when I suggest this (from your example):
if (document.getElementById&&!document.all)
menus[0].floatMenu(800, 600, 10, 0) //adjust to compensate for FF indent
menus[0].floatMenu(800, 600, 10, 0) //use IE figures here

Mike Gibbs
06-30-2005, 01:27 PM
Thanks Jon, it worked a treat. Well almost. I had to change from the float parameters to the new menu parameters as follows:

if (document.getElementById&&!document.all)
menus[0] = new menu(22, "horizontal", -3, 157, -2, -2, "#CC9900", "#FFCC66", "Verdana,Helvetica", 9,
"bold", "bold", "#663300", "#CC6600", 1, "#663300", 2, "", false, true, true, true, 6, false, 4, 4, "black")
menus[0] = new menu(22, "horizontal", 7, 157, -2, -2, "#CC9900", "#FFCC66", "Verdana,Helvetica", 9,
"bold", "bold", "#663300", "#CC6600", 1, "#663300", 2, "", false, true, true, true, 6, false, 4, 4, "black");

Mike Gibbs
07-21-2005, 06:00 PM
Just when I thought it was safe to use this wonderful menu again. I've since found out that those people who have windows service pack 2 can't see the menu at all. It just isn't there.

Any answers???


07-21-2005, 06:10 PM
Who told you that? Have you seen it happen? Which service pak 2, to what? Service pak 2 just means the second service pak for a given program, which program? I'm thinking that perhaps IE5.01 service pak 2 (which was the state of the art years ago) might be what they are talking about. There are a tremendous number of scripts that won't work in that, now antiquated, browser.

Mike Gibbs
02-10-2006, 01:13 PM
Hey Jon, who told me that??? I dunno some idiot. It seems to work fine to me.
Thanks again.

New issue.

In Firefox the text seems to sit about 3 pixels higher within it's box, so it's shifted upwards of centre. It looks OK but I wonder if anyone has an answer out there (see http://www.enchantingliguria.com) to bring it in line?