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

Relative positioning for submenu images w/a *centered* menu


Poster: adensmore
Dated: Saturday July 29 2006 - 1:02:44 BST

Thanks in advance for any help -

The menu is on a centered website, this is working fine.
(The menu appears in a centered table just fine, without even using sreenposition="center")

Using all images (all menu items are .gif's).

The mainmenu and submenu are BOTH horizontal.

What I'm having trouble with, is that the submenu image seems to want to appear directly beneath its parent menu .gif.

When I get towards the far right side of the main menu, i want the horizontal submenu beneath it to draw X number of pixels to the LEFT of it's parent menu .gif, that way there's room to fit all the submenu items without going wider than the parent menu. Sort of like right justification.

Does this make sense?

So when I try left=25 or left=-25, it draws the submenu to the far left edge of the browser window, instead *Relatively* from the *centered* main menu.

Is there another parameter I don't know about?

Or some other workaround?

I have a tight deadline for this weekend project, any help is greatly appreciated!
Thanks very much!

(URL example of what I'm talking about)


Poster: adensmore
Dated: Saturday July 29 2006 - 2:38:38 BST

The menu at the top of this website:

http://host.issupport.com/GCG/Carrier/capacity.htm

...is done in Flash,

but if you rollover "Products & Services" in the top horizontal menu, you'll see what I need to do -- This whole website is centered, but there are so many products and services in the submenu that that menu needs to be drawn X number of pixels to the left of its parent main menu image...

(in order to fit within the website's border)


Poster: Ruth
Dated: Saturday July 29 2006 - 3:18:14 BST

Hi,

You could use the left="offset=x"; in the submenus you want to shift to the left.

If you want something more specific to your menu, you'd need to post at test page.

Ruth

attempting the offset parameter, staging URL provided


Poster: adensmore
Dated: Saturday July 29 2006 - 3:48:50 BST

wow thank you for the prompt help!!

OK I've published it here:

http://www.centerforward.com/project/gcg/

I tried that offset parameter in the sub menu like this:



with(milonic=new menuname("products")){
style=menuStyle;
orientation="horizontal";
subimageposition="right";
left="offset=-200";
aI("url=http://localhost/globalca/index.php?n=30;image=menu/off/30.gif;overimage=menu/on/30.gif;");
aI("url=http://localhost/globalca/index.php?n=31;image=menu/off/31.gif;overimage=menu/on/31.gif;");
aI("url=http://localhost/globalca/index.php?n=32;image=menu/off/32.gif;overimage=menu/on/32.gif;");
aI("url=http://localhost/globalca/index.php?n=33;image=menu/off/33.gif;overimage=menu/on/33.gif;");
aI("url=http://localhost/globalca/index.php?n=34;image=menu/off/34.gif;overimage=menu/on/34.gif;");
aI("url=http://localhost/globalca/index.php?n=35;image=menu/off/35.gif;overimage=menu/on/35.gif;");
aI("url=http://localhost/globalca/index.php?n=36;image=menu/off/36.gif;overimage=menu/on/36.gif;");
aI("url=http://localhost/globalca/index.php?n=37;image=menu/off/37.gif;overimage=menu/on/37.gif;");
aI("url=http://localhost/globalca/index.php?n=38;image=menu/off/38.gif;overimage=menu/on/38.gif;");
}

But it doesn't seem to take effect, is my syntax or placement wrong?

I'll paste my menu_data.js below

Thanks so much!!


---------------------------------------------------------------------------------




_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=5 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset



with(AllImagesStyle=new mm_style()){
bordercolor="#000000";
borderstyle="solid";
padding=0;
fontstyle="normal";
fontweight="normal";
}


with(menuStyle=new mm_style()){
onbgcolor="transparent";
oncolor="#ffffff";
offbgcolor="transparent";
offcolor="#515151";
bordercolor="#000000";
borderstyle="solid";
borderwidth=0;
separatorcolor="#ffffff";
separatorsize="0";
padding=0;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage=menu/"arrow.gif";
subimagepadding="0";
overfilter="Fade(duration=0.2);Alpha(opacity=93)";
outfilter="randomdissolve(duration=0.3)";
}


with(milonic=new menuname("Main Menu")){
style=AllImagesStyle;
alwaysvisible=1;
orientation="horizontal";
subimageposition="right";
aI("showmenu=company;image=menu/off/1.gif;overimage=menu/on/1.gif;");
aI("showmenu=enterprise;image=menu/off/2.gif;overimage=menu/on/2.gif;");
aI("showmenu=carrier;image=menu/off/3.gif;overimage=menu/on/3.gif;");
aI("showmenu=products;image=menu/off/4.gif;overimage=menu/on/4.gif;");
aI("showmenu=news;image=menu/off/5.gif;overimage=menu/on/5.gif;");
aI("showmenu=customer;image=menu/off/6.gif;overimage=menu/on/6.gif;");
aI("showmenu=contact;image=menu/off/7.gif;overimage=menu/on/7.gif;");
}

with(milonic=new menuname("company")){
style=menuStyle;
overflow="scroll";
orientation="horizontal";
aI("url=http://localhost/globalca/index.php?n=8;image=menu/off/8.gif;overimage=menu/on/8.gif;");
aI("url=http://localhost/globalca/index.php?n=9;image=menu/off/9.gif;overimage=menu/on/9.gif;");
aI("url=http://localhost/globalca/index.php?n=10;image=menu/off/10.gif;overimage=menu/on/10.gif;");
}

with(milonic=new menuname("enterprise")){
style=menuStyle;
orientation="horizontal";
aI("url=http://localhost/globalca/index.php?n=11;image=menu/off/11.gif;overimage=menu/on/11.gif;");
aI("url=http://localhost/globalca/index.php?n=12;image=menu/off/12.gif;overimage=menu/on/12.gif;");
aI("url=http://localhost/globalca/index.php?n=13;image=menu/off/13.gif;overimage=menu/on/13.gif;");
}

with(milonic=new menuname("carrier")){
style=menuStyle;
orientation="horizontal";
aI("url=http://localhost/globalca/index.php?n=22;image=menu/off/22.gif;overimage=menu/on/22.gif;");
aI("url=http://localhost/globalca/index.php?n=23;image=menu/off/23.gif;overimage=menu/on/23.gif;");
aI("url=http://localhost/globalca/index.php?n=24;image=menu/off/24.gif;overimage=menu/on/24.gif;");
}

with(milonic=new menuname("products")){
style=menuStyle;
orientation="horizontal";
subimageposition="right";
left="offset=-200";
aI("url=http://localhost/globalca/index.php?n=30;image=menu/off/30.gif;overimage=menu/on/30.gif;");
aI("url=http://localhost/globalca/index.php?n=31;image=menu/off/31.gif;overimage=menu/on/31.gif;");
aI("url=http://localhost/globalca/index.php?n=32;image=menu/off/32.gif;overimage=menu/on/32.gif;");
aI("url=http://localhost/globalca/index.php?n=33;image=menu/off/33.gif;overimage=menu/on/33.gif;");
aI("url=http://localhost/globalca/index.php?n=34;image=menu/off/34.gif;overimage=menu/on/34.gif;");
aI("url=http://localhost/globalca/index.php?n=35;image=menu/off/35.gif;overimage=menu/on/35.gif;");
aI("url=http://localhost/globalca/index.php?n=36;image=menu/off/36.gif;overimage=menu/on/36.gif;");
aI("url=http://localhost/globalca/index.php?n=37;image=menu/off/37.gif;overimage=menu/on/37.gif;");
aI("url=http://localhost/globalca/index.php?n=38;image=menu/off/38.gif;overimage=menu/on/38.gif;");
}

with(milonic=new menuname("news")){
style=menuStyle;
orientation="horizontal";
aI("url=http://localhost/globalca/index.php?n=41;image=menu/off/41.gif;overimage=menu/on/41.gif;");
aI("url=http://localhost/globalca/index.php?n=42;image=menu/off/42.gif;overimage=menu/on/42.gif;");
}






drawMenus();

(subimage removed)


Poster: adensmore
Dated: Saturday July 29 2006 - 3:51:43 BST

i had this

subimageposition="right";

in the main menu and products sub menu as a test, wasn't sure what it did, i've removed that and republished, no change,
fyi

thanks

FIXED / WORKING THANK YOU


Poster: adensmore
Dated: Saturday July 29 2006 - 6:28:16 BST

OK I had no idea what I was doing wrong (or just not realizing), but the OFFSET tag *is* working that you provided ---

THANK YOU SO MUCH!!!!!

You are a lifesaver, have a great weekend


Poster: Ruth
Dated: Saturday July 29 2006 - 6:57:48 BST

Hi,

The problem is you didn't offset it left enough. Try left="offset=-264";

You can also try using screenposition="center"; in that submenu instead of the offset. That will always open it centered below the menu. That is if your layout is centered.

Ruth