Menu Item Wrapping

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Jan
Beginner
Beginner
Posts: 5
Joined: Thu May 20, 2004 8:38 pm

Menu Item Wrapping

Post by Jan »

I just upgraded from 5.12 to 5.19, and suddenly the width of my page's vertical menus exceeds the set width of 159 pixels:
(see http://coastline.cccd.edu/milonic_menu.asp)
The designers of the Web site used 159-pixel width images to set off the top and bottom of the two vertical menus, so I'm kind of stuck with the set width. But since I upgraded, it seems to be ignoring the width. I even tried setting it to a smaller width, but it remained unchanged. One hint: Formerly, the longest menu item wrapped, and now it doesn't. But I can't seem to find any property that controls whether or not menu items wrap.
I'm recommending that our college switch to Milonic and I put this up as a test page, so I want to fix it before anyone views it and thinks badly of the menu!
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Sorry, only had time for a quick glance, but you can force a wrap in your menu text with a simple <br> wherever you need it. I'm sure the rest of the gang will have other ideas.
John
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 Jan,

I see that your two "main" menus have

Code: Select all

menuwidth="159px";
in them. I have found that the menuwidth property is really more appropriate for horizontal menus, to define the overall width of the menu. Controlling the width of a vertical menu, however, equates to controlling the itemwidth, since all of the items in the menu will be th same width. So, I find that using the itemwidth property works best when you want to set the width of a vertical menu. I would suggest that you delete the above line from your menu definitions, and in its place put

Code: Select all

itemwidth=159;
Note that there's no need to specify px, since that is the default unit of measurement. And since there is no "px", the value is strictly numeric, so you can also omit the quotes.

Hope that helps,

Kevin

P.S. IMHO, it might look better to increase the width of the "capsule" images so that menu items don't have to word wrap... I think they look better that way. You can also make the top and bottom images part of the menu itself, so that they will go wherever you place the menu.
Jan
Beginner
Beginner
Posts: 5
Joined: Thu May 20, 2004 8:38 pm

Post by Jan »

Thanks, Kevin -- itemwidth works like a charm!
Post Reply