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

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
adensmore
Beginner
Beginner
Posts: 5
Joined: Sat Jul 29, 2006 12:56 am
Location: houston, texas

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

Post by adensmore »

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!
adensmore
Beginner
Beginner
Posts: 5
Joined: Sat Jul 29, 2006 12:56 am
Location: houston, texas

(URL example of what I'm talking about)

Post by adensmore »

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)
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
adensmore
Beginner
Beginner
Posts: 5
Joined: Sat Jul 29, 2006 12:56 am
Location: houston, texas

attempting the offset parameter, staging URL provided

Post by adensmore »

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=3 ... /on/30.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/31.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/32.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/33.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/34.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/35.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/36.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/37.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /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 ... u/on/8.gif;");
aI("url=http://localhost/globalca/index.php?n=9 ... u/on/9.gif;");
aI("url=http://localhost/globalca/index.php?n=1 ... /on/10.gif;");
}

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

with(milonic=new menuname("carrier")){
style=menuStyle;
orientation="horizontal";
aI("url=http://localhost/globalca/index.php?n=2 ... /on/22.gif;");
aI("url=http://localhost/globalca/index.php?n=2 ... /on/23.gif;");
aI("url=http://localhost/globalca/index.php?n=2 ... /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=3 ... /on/30.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/31.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/32.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/33.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/34.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/35.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/36.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/37.gif;");
aI("url=http://localhost/globalca/index.php?n=3 ... /on/38.gif;");
}

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






drawMenus();
adensmore
Beginner
Beginner
Posts: 5
Joined: Sat Jul 29, 2006 12:56 am
Location: houston, texas

(subimage removed)

Post by adensmore »

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
adensmore
Beginner
Beginner
Posts: 5
Joined: Sat Jul 29, 2006 12:56 am
Location: houston, texas

FIXED / WORKING THANK YOU

Post by adensmore »

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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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