Horizontal menu 100% width

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
upton
Beginner
Beginner
Posts: 6
Joined: Wed Oct 19, 2005 10:27 am

Horizontal menu 100% width

Post by upton »

I've set up a horizontal menu with nine options in 'Main Menu' in a table cell, which works fine.

I've used menuwidth="100%" which has spread the menu to fill the screen width.

However, I would like the 'Main Menu' options to fill the 100% proportionally so it will display 100% whatever the user's screen settings.

Is this possible?

This is what I have in the table cell in index.html:

with(milonic=new menuname("Main Menu")){
screenposition="right";
alwaysvisible=1;
orientation="horizontal";
position="relative";
left=10;
overflow="scroll";
menuwidth="100%"
style=menuStyle;
top=10;
aI("showmenu=where;text=About us;");
aI("showmenu=arch;text=Archaeology;");
aI("showmenu=eng;text=Engineering;");
aI("showmenu=util;text=Utilities/Pipelines;");
aI("showmenu=clients;text=Clients/Projects;");
aI("showmenu=contact;text=Contact Us;");
aI("showmenu=links;text=Links;");
aI("sitemap.html;text=Site Map;");
aI("search.html;text=Search;");

Thanks

Jackie
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

If you're saying you want the items to spread out and span 100%, then you need to set menuwidth="100%"; and then each item you have to put in the percentage for that item and all items must not total more than 100% when added together. I hope that's what you meant.

Ruth
upton
Beginner
Beginner
Posts: 6
Joined: Wed Oct 19, 2005 10:27 am

Post by upton »

That's what I meant - I was hoping there would be an automatic way for the menus to spread out to fill the available space. I'll try setting each one to a percentage as you suggest.

Thanks

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

Post by Andy »

Hi,

This has now been fixed for the next version of the menu (v5.737)

Adding itemwidth="100%" to your Horizontal menu will allow the menu item to spread out.

Hope this helps,
Andy
keithyoung89
Advanced
Advanced
Posts: 12
Joined: Fri Dec 02, 2005 1:00 pm
Location: UK

I found the same error

Post by keithyoung89 »

I have posted separately on this same problem. I was on v5.66 which did exactly what you want but v5.736 messed things up. I was advised to use the pre-release of 5.737 which indeed spreads the menu 100% but does not do a very good job spacing out the menu items.

I find it disappointing that new releases of the menu are so 'buggy'.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

How exactly does it "not do a very good job spacing out the menu items"? That's pretty generic, are they too far apart, too close together, too long for some too short for others? We'd have no idea what the problem is from that. Do you have a page please so we can see it and info on just how you the menu to look?

Ruth
tootricky
Advanced
Advanced
Posts: 28
Joined: Tue Dec 07, 2004 4:07 pm

Re: I found the same error

Post by tootricky »

keithyoung89 wrote:I have posted separately on this same problem. I was on v5.66 which did exactly what you want but v5.736 messed things up. I was advised to use the pre-release of 5.737 which indeed spreads the menu 100% but does not do a very good job spacing out the menu items.

I find it disappointing that new releases of the menu are so 'buggy'.
Lets all just be a bit more positive about this fantastic menu, becuase at the end of the day the main issues are really how we implement the menu aren't they?

You are asking the menu to fill 100% of an unknown width; you are asking the item widths (which are also unknown) to fill proportionally within that unknown width... Throw into the mix the box model "issues" of some browsers; a bit of padding; borders and margins and you are almost destined to fail to produce exactly what you EXPECT...

I really don't think its the menu that is buggy its peoples expectations that all these different browsers are going to render exactly what you want exactly how you want when you are not helping them by not setting constants... milonic are obviously trying to help people with this issue but I rather thinks its peoples understanding of how these technoogies are implemented thats the problem.

And no I don't work for milonic, but I use the menu on many sites with few issues and its fab!
keithyoung89
Advanced
Advanced
Posts: 12
Joined: Fri Dec 02, 2005 1:00 pm
Location: UK

Menu item spacing - Ruth

Post by keithyoung89 »

This is the subject of my separate post which has the following links to illustrate what is happening:

The menu should look like this: http://www.glengolfclub.co.uk (this is v.5.66)

The menu looks like this: http://www.youngcc.co.uk/glen (this is v5.737 pre-release)

Thanks
oziumjinx
Beginner
Beginner
Posts: 1
Joined: Wed Dec 14, 2005 9:59 pm

not finding that variable

Post by oziumjinx »

Im also trying to adjust the width of the menu to resize with different resolutions. I can't seem to find the variable that you mention: menuwidth=100%

I cant seem to find menuwidth within the menu_data.js file. Am I looking in the wrong place?

The other files contain quite a number of references to that variable, but Im not sure which one to modify. Can you please point me in the right direction.

I just downloaded Milonic DHTML Menu today, Dec 14, '05 and Im not sure which version I have.

Thanks in advance.

-Vin
keithyoung89
Advanced
Advanced
Posts: 12
Joined: Fri Dec 02, 2005 1:00 pm
Location: UK

Menu params

Post by keithyoung89 »

Yes, the only file you ever amend is the menu_data.js file to configure your menu. Having downloaded the menu it does not necessarily follow that the menuwidth param is in the downloaded file; there are stacks of statements you can include and you have downloaded an example to act as a starter for you to play with.

You can now add/amend/delete statements to get the menu looking and behaving as you would like to see it.

To find which version you have, open one of the other .js files (can't remember if this works with them all) with a text editor and you'll see the version at the top of the script.

Hope this helps you, Keith
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi Vin,

Keith is right on finding the version, you can open any of the 3 base program files and find it at the top; also, when you downloaded it you probably got something like

Code: Select all

menu_sample1_ver5_736.zip
depending on which sample you downloaded, as the file you were downloading, that is the version ver5_736.

Below my name you'll see some links. Take a look at the ones under Menu Reference. Those are the various properties which you can apply in the menu. Also, check the link to the beginner's guide forum which contains some very short examples of things for beginners. They are pretty quick read items.

menuwidth=; is a menu property and goes in the same area as things like alwaysvisible=; orientation=; etc., you can use it to set the width by percentage or by fixed width, i.e. 760px

Ruth
Post Reply