horizontal menu items keep shrinking

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
naclhead
Beginner
Beginner
Posts: 3
Joined: Tue Aug 03, 2004 5:55 pm

horizontal menu items keep shrinking

Post by naclhead »

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
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Hi, we need a url to see your code.

Off hand have you tried padding?

maz
naclhead
Beginner
Beginner
Posts: 3
Joined: Tue Aug 03, 2004 5:55 pm

Post by naclhead »

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&nbspPage;showmenu=home;url=/socal/index.cfm;separatorsize=1")
aI("text=Ways&nbspTo&nbspGive;showmenu=waysto;url=./index.cfm?givingID=2;separatorsize=1")
aI("text=Sponsor&nbspA&nbspStudent  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&centerID=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? ... atorsize=1")

}


Thanks for you help. I love the menu. It's veryl trick and easy to use.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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&nbspPage;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&nbspA&nbspStudent  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: Select all

aI("text=Home&nbspPage;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... :roll:

Appreciate the kind words about the menu - it definitely is the best DHTML menu system around!
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
Post Reply