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:16
horizontal menu items keep shrinking
Poster: naclhead
Dated: Tuesday August 3 2004 - 18:00:25 BST
The item width is default set to 100 but when I view the menu items that don't have sub menus gradually they shrink until they are just the size of the text. In other words I have one menu item called "How To" with no sub menu. It starts out at 100px then gradually shrinks until it is just big enough to contain the text, "How To." Any insight on how I can make it stay at 100px?
Thanks
Poster: Maz
Dated: Wednesday August 4 2004 - 4:45:49 BST
Hi, we need a url to see your code.
Off hand have you tried padding?
maz
Poster: naclhead
Dated: Wednesday August 4 2004 - 16:59:02 BST
I am testing on my staging so I don't think you can see the code. I can try to figure out a way to test it live on an obscure page and let you know.
BTW. If I declare it as a submenu and just don't put any submenu items under it i.e if I include the showmenu=home but don't have any actual menu items in the 'home' menu AND I declare subimage="/images/5x5.gif" or anything esle in the submenu image property of the 'style1' then the problem goes away. So that is a work around for me but it seems odd that I would have to do that.
with(milonic=new menuname("mainmenu")){
top=159;
left=138;
itemwidth=100;
style=style1;
alwaysvisible=1;
alignment="left";
orientation="horizontal";
aI("text=Home Page;showmenu=home;url=/socal/index.cfm;separatorsize=1")
aI("text=Ways To Give;showmenu=waysto;url=./index.cfm?givingID=2;separatorsize=1")
aI("text=Sponsor A Student showmenu=sponsor;separatorsize=1")
aI("text=Locations showmenu=locations;separatorsize=1")
}
with(milonic=new menuname("home")){
itemwidth=160;
style=style1;
alignment="left";
}
with(milonic=new menuname("waysto")){
itemwidth=160;
style=style1;
alignment="left";
aI("text=Donate Now;url=./index.cfm?givingID=1¢erID=1024;separatorsize=1")
aI("text=Ways To Give;url=./index.cfm?givingID=2;separatorsize=1")
aI("text=Matching Gift Plans;url=./index.cfm?givingID=3;separatorsize=1")
aI("text=History;url=http://www.teenchallenge.com/index.cfm?infoID=7¢erID=1194;separatorsize=1")
}
Thanks for you help. I love the menu. It's veryl trick and easy to use.
Poster: John
Dated: Wednesday August 4 2004 - 18:47:44 BST
To be picky (because I just got back from the dentist!), there are a few syntax errors in what you posted...
1. You're missing the closing ; in some of your items.
2. You actually don't need the for a single space; e.g., you have aI("text=Home Page;showmenu=home;..., where aI("text=Home Page;showmenu=home;... will work just fine.
3. Where you have a double space; e.g., aI("text=Sponsor A Student showmenu=sponsor;..., you need a ;; after the last in the chain when it is the last item in a parameter, as aI("text=Sponsor A Student ;showmenu=sponsor;... . One ; closes the , the other closes the parameter.
4. All aI statements should close as follows...
Code:
aI("text=Home Page;showmenu=home;url=/socal/index.cfm;separatorsize=1;");
Note the 2 additional ;; at the end - one to close the last parameter, the other to close the aI.
As Maz suggested, if you can get a temp page up for us to look at it would be a big help.
If all this makes no sense blame the doc...
Appreciate the kind words about the menu - it definitely is the best DHTML menu system around!
Poster: Ruth
Dated: Thursday August 5 2004 - 20:47:16 BST
And, not being able to see your actual menu style doesn't help either since we don't know what, if any, padding, margins, borders etc, you have. One thing, try putting that itemwidth=100; directly into the items that don't have submenus. And we also don't know which version you have, if it's older then it may be something that was fixed in newer releases.
Ruth