Menu widths not correct

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
User avatar
Pico
Beginner
Beginner
Posts: 5
Joined: Tue Jun 17, 2003 5:21 pm
Location: Michigan, USA

Menu widths not correct

Post by Pico »

I was wondering if anyone had any idea what would cause this:

I am using v 3.5.15 of the menu. I only have one script running the menu. The problem that I am having, is that it displays entirely correct in Netscape, and only partially correct in IE and Opera. The problem in IE and Opera is different.

In IE, the problem shows up on every page except the main page which the submenus' highlight and border don't get cut off at the appropriate length as they do in the main page.

In Opera, the problem is slightly different, in that it adds an extra space in each submenu item cell.

Here is a snippit from the menu_array.js file that I am using:

Code: Select all

addmenu(menu=["SUPPORT",
    ,,160,1,,XPMenu,0,,,
    0,0,0,,,0,0,,,0,"margin=2",
    ," Common Questions","# onbordercolor=316AC5;offbordercolor=99CCFF;",,"Support :: Common Questions",0
    ," Help & Support","# onbordercolor=316AC5;offbordercolor=99CCFF;",,"Support :: Help & Support",0
    ," Online Documentation","# onbordercolor=316AC5;offbordercolor=99CCFF;",,"Support :: Online Documentation",0
    ]);
I have played around with the code as many ways as I can think that might affect it, but to no avail. I tried downloading a newer version of mmenu.js, double checking for closed strings and the right number of commas, I even recreated my menu using the Menu Builder.

Any input is greatly appreciated.
There are 10 kinds of people in this world, those who understand binary and those who don't.
User avatar
Pico
Beginner
Beginner
Posts: 5
Joined: Tue Jun 17, 2003 5:21 pm
Location: Michigan, USA

Post by Pico »

I forgot to post the url where you can view the problems, here they are:

http://www.acsurf.net/jobs/default.php (correct display)
http://www.acsurf.net/jobs/lost_password.php (incorrect display)

Thanks for your time.
There are 10 kinds of people in this world, those who understand binary and those who don't.
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Pico,

Hmmm... It's odd that the submenu width on the page that works is actuall 167, even though you've specified 160. On the page that doesn't work, the submenu width is actually 160, which would explain why the right side is getting clipped. Now, why the difference? Don't know yet myself, but I might find it. Meantime, try adjusting your menu width to 167 (or higher) and see what happens...

Kevin
User avatar
Pico
Beginner
Beginner
Posts: 5
Joined: Tue Jun 17, 2003 5:21 pm
Location: Michigan, USA

Post by Pico »

Meantime, try adjusting your menu width to 167 (or higher) and see what happens...
I did actually try adjusting the size, both to a size larger than the 160 (165, 175, 200) and without a size specified, both to no avail. I really do appreciate the time you are putting into this.
There are 10 kinds of people in this world, those who understand binary and those who don't.
User avatar
Non
Advanced
Advanced
Posts: 15
Joined: Wed May 21, 2003 6:26 pm
Location: The Netherlands

Menu Width diffference in IE and Netscape

Post by Non »

I also noticed a difference in the way the menu width is handled bij Netscape and IE:
I set the menu width to 77 pix. Netscape makes every main menu 'button' the same size, but IE makes the main menu buttons wider that contain more text than what will fit in 77 pix. If the text fits in, the menu is 77 pix.

In my case, this causes a nice lay-out in IE, but cut off and overlapped (by the down arrow gif) text in Netscape.

URL: http://www.hmz.nl

If anyone knows a solution to this, I'll be glad to hear it!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

A couple of suggestions: Try not setting a width at all in your mainmenu. The menu system will attempt to set a width for each menu item, based on the text in each item. You'll notice some "squeezing" on some of your items that have submenus. Note that the items you've padded at the end with a couple of  's don't get squeezed, but the ones you haven't padded do get squeezed. So, place some non-breaking spaces at the end of each item that opens a submenu.

Another approach would be to (1) not specify a width, as mentioned above, (2) remove arrowdn.gif from the 17th element of the style1 array, (3) you won't have any "down arrows" in your main menu now, so you could insert them in the appropriate items manually, using an <img> tag, like so:

Code: Select all

,"HMZ&nbsp;info&nbsp;<img border=0 src=arrowdn.gif>","show-menu=hmz","http://www.hmz.nl/hmz/index.htm","",1
Because the down arrow is part of the html in the menu item, it should be taken into account when the menu system figures out the width for that item, so you shouldn't get any squeezing.

Hope that helps,

Kevin
User avatar
Non
Advanced
Advanced
Posts: 15
Joined: Wed May 21, 2003 6:26 pm
Location: The Netherlands

Post by Non »

A couple of suggestions
Thanks Kevin, you wrote a nice 'usermanual' for me! Since I am quite new to this menu, this information is very welcome, and I will try it as soon as I can (a little busy with other things at the moment). I will post a message as soon as I changed the menu in the way you suggest.

Nadia
Post Reply