Position Help Needed

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
bmarlin
Beginner
Beginner
Posts: 8
Joined: Tue Feb 21, 2006 6:45 pm

Position Help Needed

Post by bmarlin »

I have tried the two solutiuons Ruth posted by I am not able to get the menu to center in Firefox. Can someone please help me!!! The url is http://www.igdglass.com
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Position Help Needed

Post by John »

First you need to upgrade to the current version, v5.792 (you're 5 version down). Then we'll go from there.
John
bmarlin
Beginner
Beginner
Posts: 8
Joined: Tue Feb 21, 2006 6:45 pm

Re: Position Help Needed

Post by bmarlin »

What is the quickest and easiest way to upgrade?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Position Help Needed

Post by John »

Go to http://milonic.com/menuvinfo.php and click on the link under the 5.792 box at the top of the page. You will need to log in over there - note that it's a different login than for the forum (unless you made it the same).
John
bmarlin
Beginner
Beginner
Posts: 8
Joined: Tue Feb 21, 2006 6:45 pm

Re: Position Help Needed

Post by bmarlin »

OK. I did the update but I still need help with getting the menu to align the same in firefox as it does in ie
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Position Help Needed

Post by Ruth »

Hi,

Add this right below your menuStyle style

Code: Select all

mainStyle=new copyOf(menuStyle);
mainStyle.menubgcolor="#FDF602";
Then change your main menu coding to

Code: Select all

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
position="relative";
//left=10;
orientation="horizontal";
style=mainStyle;
//top=10;
menualign="center";
menuwidth='100%';
The reason for the new style for the main is that I don't know what the menubgcolor being set would do to the submenus.

Ruth
bmarlin
Beginner
Beginner
Posts: 8
Joined: Tue Feb 21, 2006 6:45 pm

Re: Position Help Needed

Post by bmarlin »

Is this the correct code as per your instructions? The menu has lost formatting http://www.igdglass.com

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=2;
_subOffsetLeft=-2;
buildAfterLoad=true;




with(menuStyle=new mm_style()){
mainStyle=new copyOf(menuStyle);
mainStyle.menubgcolor="#FDF602";
bordercolor="#313131";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="100%";
fontstyle="normal";
headerbgcolor="";
headercolor="";
offbgcolor="#FDF602";
offcolor="#000000";
onbgcolor="#313131";
oncolor="#ffffff";
outfilter="randomdissolve(duration=0.3)";
//overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=8;
menubgcolor="#ffffff";
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#000000";
separatorsize=1;
subimage="/menu/arrow.gif";
subimagepadding=2;
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
position="relative";
//left=10;
orientation="horizontal";
//style=menuStyle;
style=mainStyle;
//top=10;
menualign="center";
menuwidth='100%';
aI("text=Home;url=/;");
aI("showmenu=Products;text=Products;");
aI("showmenu=InfoCentre;text=Info Centre;");
aI("text=Branch Locator;url=locator.shtml;text=Branch Locator;");
aI("text=Monthly Specials;url=/forms/current_vision_flyer.pdf;target='_blank';text=Monthly Specials;");
aI("text=About Us;url=about.shtml;text=About Us;");
aI("text=Join IGD Us;url=join.shtml;text=Join IGD;");
aI("text=Contact Us;text=Contact Us;url=general_contact.shtml;text=Contact Us;");
aI("showmenu=Online Ordering;text=Online Ordering;");
}
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Position Help Needed

Post by Ruth »

Hi,

You forgot to add the mainStyle code. It would be like this, starting from the separatorcolor in you menuStyle and ending at the line before the first aI string in the main menu.

Code: Select all

separatorcolor="#000000";
separatorsize=1;
subimage="/menu/arrow.gif";
subimagepadding=2;
}

mainStyle=new copyOf(menuStyle);
mainStyle.menubgcolor="#FDF602";

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
position="relative";
//left=10;
orientation="horizontal";
style=mainStyle;
//top=10;
menualign="center";
menuwidth='100%';
Ruth
bmarlin
Beginner
Beginner
Posts: 8
Joined: Tue Feb 21, 2006 6:45 pm

Re: Position Help Needed

Post by bmarlin »

Ruth,

I really appreciate all you help. I changed the code like you said but it is still showing to the left in Firefox. I changed menualign="center"; to menualign="left"; as I want the home button to be aligned to the left. IS there any files are FTP access I can give you to help further?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Position Help Needed

Post by Ruth »

Hi,

You either can aligned to the left or to the center or to the right. You can't align an item by itself, making one item be at the left and the rest at the center. If what you mean by 'center' is you want the items to spread out in that div so they are the full width of the div, then that is the menu and item widths, it has nothing to do with aligning the menu.

So, if that is what you mean by 'center' then you can eliminate that mainStyle section I gave you, put back the menuStyle into the main menu instead of style= mainStyle that is go back to your original data file before the changes. Then in the mian menu you'd set the following

Code: Select all

menuwidth="100%";
itemwidth="100%";
That will make the whole menu be as wide as that div. If you want the 'home' item separate from the rest and have it left and the rest centered, then you have to create different menus and set up a table in that div with 1 row and 2 columns, put the home 'menu' in the 1st column with the width set and then but the other menu in the second one and do menualign='center'; and menuwidth='100%' and the menubgcolor stuff. That is use the mainStyle thing in that second menu.

Ruth
Post Reply