Menu spans 100% width BUT cannot set individual % widths

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ms8qt
Beginner
Beginner
Posts: 9
Joined: Thu Oct 20, 2005 6:50 pm

Menu spans 100% width BUT cannot set individual % widths

Post by ms8qt »

Hello all,

I'm so near (but yet so far) to completing the type of menu I need with Milonic v. 5.746. Basically I'm using a horizontal menu that spans 100% of the browser width - this works. However, I have 5 menu items and I want to set % widths for these which doesn't seem to work at all. In short, I want the first menu item (aI tag) to span 40% and the other 4 menu items to span 15%...totalling 100%.

My current code is copied below but first please have a look at the 2 screenshots at the links below...

http://www.my-weblinks.com/Incorrect.jpg ("I want to..." wraps onto 2 lines - incorrect!)

http://www.my-weblinks.com/Correct.jpg ("I want to..." takes up only 1 line after making browser wider - correct! However, I want the browser window narrow as in the above Incorrect.jpg)

Code: Select all

fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=0;
_subOffsetLeft=0;

with(horizStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="arial, tahoma";
fontsize="14";
fontstyle="normal";
headerbgcolor="#AFD1B5";
headerborder=1;
headercolor="#000099";
offbgcolor="#CFE2D1";
offcolor="#000000";
onbgcolor="#FEFAD2";
onborder="1px solid #999999";
oncolor="#000000";
onsubimage="./Images/downboxed.gif";
overbgimage="backon_beige.gif";
padding=3;
pagebgcolor="#CFE2D1";
pagecolor="#000066";
pageimage="db_red.gif";
separatoralign="right";
separatorcolor="#999999";
separatorwidth="85%";
subimage="./Images/downboxed.gif";
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
followscroll="0";
menuwidth="100%";
orientation="horizontal";
style=horizStyle;
top=1;
margin=2;
aI("itemwidth=40%;showmenu=I want to...;text=I want to...;subimageposition=left;");
aI("itemwidth=15%;image=./Images/addweblink.gif;imagealign=center;onfunction=showtip('Add a weblink');");
aI("itemwidth=15%;image=./Images/addfolder.gif;imagealign=center;onfunction=showtip('Add a folder');");
aI("itemwidth=15%;image=./Images/fixsizepos.gif;url=javascript:fixSizePos();imagealign=center;onfunction=showtip('Fix window size and position');");
aI("itemwidth=15%;image=./Images/exit.gif;imagealign=center;onfunction=showtip('Exit');");
}
Many thanks in advance!
Mark.
Last edited by ms8qt on Wed May 03, 2006 11:05 am, edited 1 time in total.
ms8qt
Beginner
Beginner
Posts: 9
Joined: Thu Oct 20, 2005 6:50 pm

Is it really that hard (or impossible)? - please help

Post by ms8qt »

Hello all,

It appears that my thread is practically the only one without replies - is what I'm asking really very difficult or even impossible? (I would hope not).

Please help if you can.

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

Post by Andy »

Hi,

Sorry that nobody has picked this up.

Anyway, try this:

Code: Select all

aI("itemwidth=40%;showmenu=I want to...;text=I want to...;subimageposition=left;");


The   will add non breaking spaces to your menu
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

Andy,

He asked this question twice. See this thread:

http://milonic.com/forum/viewtopic.php?t=7449
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Thanks Viken, I'll leave it alone then :D
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

Andy,

This was never resolved. You may want to take a quick look at this one. :)
I just uploaded a quick explanation to my website. If you read the other thread you will find the link to it :)
Post Reply