menu width changes automatically

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
freeman2002
Advanced
Advanced
Posts: 11
Joined: Wed Jun 02, 2004 10:52 pm
Location: Montreal
Contact:

menu width changes automatically

Post by freeman2002 »

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...
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
freeman2002
Advanced
Advanced
Posts: 11
Joined: Wed Jun 02, 2004 10:52 pm
Location: Montreal
Contact:

Post by freeman2002 »

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?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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: Select all

using that option puts the code in a special section like this


Ruth
freeman2002
Advanced
Advanced
Posts: 11
Joined: Wed Jun 02, 2004 10:52 pm
Location: Montreal
Contact:

Post by freeman2002 »

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
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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
freeman2002
Advanced
Advanced
Posts: 11
Joined: Wed Jun 02, 2004 10:52 pm
Location: Montreal
Contact:

Post by freeman2002 »

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...
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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: Select all

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://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
freeman2002
Advanced
Advanced
Posts: 11
Joined: Wed Jun 02, 2004 10:52 pm
Location: Montreal
Contact:

Post by freeman2002 »

that's exactly what I wanted!

but what did you add to the code?
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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

maz
Post Reply