Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:06

Menu spans 100% width BUT cannot set individual % widths


Poster: ms8qt
Dated: Tuesday May 2 2006 - 14:12:35 BST

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:
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.

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


Poster: ms8qt
Dated: Wednesday May 3 2006 - 10:53:28 BST

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.


Poster: Andy
Dated: Tuesday May 16 2006 - 18:01:31 BST

Hi,

Sorry that nobody has picked this up.

Anyway, try this:

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


The   will add non breaking spaces to your menu


Poster: vikenk
Dated: Tuesday May 16 2006 - 18:26:38 BST

Andy,

He asked this question twice. See this thread:

http://www.milonic.com/forum/viewtopic.php?t=7449


Poster: Andy
Dated: Tuesday May 16 2006 - 18:30:01 BST

Thanks Viken, I'll leave it alone then :D


Poster: vikenk
Dated: Tuesday May 16 2006 - 18:37:05 BST

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 :)