Even spacing of different-sized menu items

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jgold723
Super Advanced
Super Advanced
Posts: 40
Joined: Wed Nov 19, 2003 10:14 pm

Even spacing of different-sized menu items

Post by jgold723 »

I'm trying to get the items in my horizontal menu to spread out evenly. using menuwidth=100% and itemwidth=100%, I've gotten them to spread out, but the spacing between the various words differs -- I suspect because the menu is setting a single width for each item based on the width of the widest item.

Is there a way to get the same amount of space between each item?

Like this:

ITEM 1 THIS IS ITEM 2 THIS IS YET A LONGER ITEM ITEM S AND A VERY LONG ITEM
jgold723
Super Advanced
Super Advanced
Posts: 40
Joined: Wed Nov 19, 2003 10:14 pm

Re: Even spacing of different-sized menu items

Post by jgold723 »

Oops -- sorry, my example didn't work very well because the browser ignores the extra spaces.

But hopefully my words explain it sufficiently. I want the same amount of space between the different menu items, regardless of their individual length.

John
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: Even spacing of different-sized menu items

Post by Andy »

Hi,

You can add itremwidth to your menu items to get them to use a specifieds width, something like this:

aI("text=Sample;itemwidth=200");

This will set the width to 200 pixels for the single menu item. If you want to apply an itemwidth to all meun items, you can add itemwidth to either a menus style or to the menu itself.

HTH,
Andy
Post Reply