Relative positioning for DHTML menu

Home » Forums » Free DHTML Menu Builder » Relative positioning for DHTML menu


Ambassador
92 posts

I found an entry in here that says the menus created by the Free DHTML menu builder create menus that are positioned "absolute" only.. meaning that if the site's window is resized, the menu itself will move around the screen, which is what is happening with my site now... not a good thing. I'm wondering if anyone has found a way to anchor it in a relative position. I'm very new to all this, and am a total noob at html coding. Any help in this regard would be most appreicated.

I also saw a posting stating that the DHTML menu could not be used with the VSD, which is what i'm using. I simpy stick the code generated in a html object, and it works aok, except for the absolute positioning problem. Am I missing something? All my best,
Scott Tucker


Senior Advisor
3,144 posts

Scott,

Take a look at any of the sites in my signature tag and see if that is the way you want the menu to behave. If so, leave the menu builder positions at the default setting. Open the menu code using a text editor. Locate the line that reads:
var TargetLoc=''; // span id for relative positioning
Change that to read:
var TargetLoc='themenu'; // span id for relative positioning

Now go to the top of the menu code and add:

<span id="themenu">

Now add a line to the very bottom of the code that reads:
</span>

That should keep the menu where you put it even if the browser width is changed. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Ambassador
92 posts

Hi Bill,
Thank you so much!! yes, I just want the menu to stay put no matter how the viewer may resize the window. My menu doesnt fit all the way across the screen as yours does. Does that matter?

I am using a second Flash menu for now until I get this sorted out. You can kinda see what im doing by looking here http://www.csaltc.com/test/ltcsoftware.html

Scott
All my best,
Scott Tucker


Senior Advisor
3,144 posts

Scott,

One thing I have done, is to insert a blank menu on each side, and adjust the width of each to center the menu. Look at the menu on the Brighter Day site, and mouse over the menu to see what happens. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Registered User
72 posts

BillR,

I wonder if you can help me, I have followed your instructions above to Scott and I have successfully stabilised the position of my menu in IE.

However in Firefox the menu drops to the bottom of the screen and does not work.

Do you have any suggestions to make the menu display the same in Firefox?

The page to look at is
http://www.ludlow-click.co.uk/accommoda … k_list.php


Senior Advisor
3,144 posts

JaneA,

I looked. No DHTML menu on that page that I could find in your code. I checked with both FF3 and IE6, and see no difference on that page. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Registered User
72 posts

BillR

I have just read a previous forum with advice from you suggesting a download of the old DAT file and replacing this with the current one.
I have carried out your instructions and this has worked. The DHTML menu is now displaying correctly in both browsers.

I have linked the menu via a nav.php file. maybe that is why you cant see a DHTML menu in the page code.

Hopefully you should see a menu under the banner.


Senior Advisor
3,144 posts

JaneA,

Typically a nav.php would cause the entire nav.php file to be displayed, but while I do see the menu, you have hidden the code itself nicely.

I have looked at the page in your link, and now I think we are talking about different things. What I see on your page is HTML anchor links.

The CoffeeCup DHTML menu builder, in stand alone free version and built-in the HTML editor is not what I see on your page.

Does your menu code have something like this at the beginning?


Menu1=new Array("Home","http://www.yoursite.com/index.php","",0,20,120);

Menu2=new Array("Contact info","http://www.yoursite.com/contact.php","",0,20,120);

Menu3=new Array("Projects","http://www.yoursite.com/projects.php","",0,20,120);

Menu4=new Array("Membership","member.php","",0,20,120);

If so, then you have a CC DHTML menu. Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Registered User
72 posts

Hi BillR,

Sorry it is a bit confusing. I have not got the DHTML menu on the main index page but on every page in the index list. for example if you click on the accommodation link it will take you to the page with the DHTML menu, which now displays correctly in both browsers thanks to your help both past and present.

You’re a very kind gent BillR and it is appreciated.
Thank you


Registered User
10 posts

very helpful - thank you for posting this. having an absolute positioning only tool made its use very limited.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.