independently setting menu widths

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Elander
Beginner
Beginner
Posts: 3
Joined: Fri Jul 25, 2003 12:48 am
Location: Australia

independently setting menu widths

Post by Elander »

Is there any way to independently set the width of each of the main menu items.

For example, I need some to be longer and some shorter.

I see that they set their widths dependent upon the text, but I actually want to be able to set their individual widths. Similar to the way you can independently set the widths of each submenu group.


Any help appreciated.



Regards, Mark
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

in the item declarations you can specify item width.
i.e.

Code: Select all

aI("itemwidth=75;text= Reports ;showmenu=reports;separatorsize=1;");
aI("itemwidth=85;text= Human Resources ;showmenu=hr;");
Now I know if these two items were part of a vertical menu, the entire menu would be the size of the largest itemwidth. But in a horizontal menu, I believe they are independant of eachother can you can get items that are longer than others. Give it a try.

P.S. If you put a percentage in there, i.e. itemwidth=20%, it will take it and try to render, but you might get unexpected results. It probably won't be 20% of the page. You're safer sticking with straight pixel widths.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Elander
Beginner
Beginner
Posts: 3
Joined: Fri Jul 25, 2003 12:48 am
Location: Australia

independently setting the width of mainmenu items

Post by Elander »

Thanks Hergio,

Your suggestion was spot on and resolved the problem for me.
I was on a bit of the wrong path as I was using a 3.x version of the menu which made understanding the format of your code a bit obscure. However, I downloaded the new 4. beta version and it all made sense.

Thanks again !
Elander :D
Post Reply