Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:25

menu width changes automatically


Poster: freeman2002
Dated: Wednesday June 2 2004 - 22:55:14 BST

Hi all
i'm a beginner with this menu, and by the way it is fantastic, so many options, it's great!

but my question is as follows : I set a menuwidth of 120 for each cell, it works fine. But when I resize the IE window, the menu seems to resize automatically to fit the window. I want it to stay 120 and not resize even if the explorer window width is smaller than the menu...


Poster: Ruth
Dated: Wednesday June 2 2004 - 23:03:56 BST

Hi back at 'cha :) Thanks for the kind words. Could you give us a url so we can check the menu? Sometimes there is another reason, a css style sheet or another code on the page, so seeing the page would be reallly helpful.

Ruth


Poster: freeman2002
Dated: Thursday June 3 2004 - 1:58:19 BST

I can't give u an URL cause it's an Intranet website :(
isn't there something to force the menu to keep its specified width and not adjust automatically to the window size?


Poster: Ruth
Dated: Thursday June 3 2004 - 2:30:17 BST

Well, you can try putting menuwidth= in the menu code putting in whatever size the total number of your items x 120, then put itemwidth of 120. Without seeing the page it's hard to give suggestions.

Could you perhaps post a test page with at least your html code, your css code and the menu on it someplace on the web? Alternatively, could you post your menu code, your html code for say your main page with the menu, and css code here. Someone can try to make and test the page using it. If you can't post on the web someplace with a test page and post the code here...PLEASE use the above code option so it would come out like this
Code:
using that option puts the code in a special section like this


Ruth


Poster: freeman2002
Dated: Thursday June 3 2004 - 15:24:31 BST

hi, I've just set up a test directory on one of my old websites

here's the link :
http://www.michelpaquette.com/test/Manu ... gement.htm

Resize the window and you will see what my problem is :-)

I want the menu to stay always at the same place, and at the same size. What is the best way to do this?

thanks


Poster: kevin3442
Dated: Thursday June 3 2004 - 18:21:58 BST

freeman2002 wrote:
...I want the menu to stay always at the same place, and at the same size. What is the best way to do this?


Thanks for taking the time to post a test page.

You say you want the menu to be always in the same place, but you use screenposition="center". Do you want the menu centered on the page and also re-centered when the window width changes? Or do you want the menu to be positioned absolutely, and never move at all? Once we get that answered, we'll have a solution for you.

Cheers,

Kevin


Poster: freeman2002
Dated: Thursday June 3 2004 - 19:24:24 BST

I want the menu to never move from that position, nor changes its width automatically when the window is resized...

Do you see the light blue cell where it's marked "Cornwall Maintenance Center"? Well I want the menu to behave exactly the same way.. and stay on it no matter if the window is resized or not...
I don't know if you understand what I mean...


Poster: kevin3442
Dated: Thursday June 3 2004 - 19:56:35 BST

freeman2002 wrote:
I want the menu to never move from that position, nor changes its width automatically when the window is resized...Do you see the light blue cell where it's marked "Cornwall Maintenance Center"? Well I want the menu to behave exactly the same way.. and stay on it no matter if the window is resized or not...I don't know if you understand what I mean...


So... actually, it does move, just like the blue cell moves; it is centered, but it's left coordinate changes as you re-size the window, so that it remains centered in the viewable area. We can make the menu behave the same way; keeping it centered, with the same width, and the same menu item widths, no matter how the window is sized. Try replacing your Main Menu definition with this:
Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
orientation="horizontal";
alwaysvisible=1;
screenposition="center";
menuwidth=680;
itemwidth=113;
menualign="center";
top=143;
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;itemwidth=120");
aI("text=Menu Samples;showmenu=Samples;");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=MyMilonic;");
}

Hope that helps,

Kevin


Poster: freeman2002
Dated: Thursday June 3 2004 - 21:16:47 BST

that's exactly what I wanted!

but what did you add to the code?


Poster: Maz
Dated: Thursday June 3 2004 - 23:33:49 BST

I think its was screenposition and menuwidth, but I wasn't really following the thread.

maz