Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:23
independently setting menu widths
Poster: Elander
Dated: Friday July 25 2003 - 0:57:12 BST
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
Poster: Hergio
Dated: Friday July 25 2003 - 15:57:32 BST
in the item declarations you can specify item width.
i.e.
Code:
aI("itemwidth=75;text= Reports ;showmenu=reports;separatorsize=1;");
aI("itemwidth=85;text= Human Resources ;showmenu=hr;");
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.
independently setting the width of mainmenu items
Poster: Elander
Dated: Monday July 28 2003 - 0:16:37 BST
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