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: Thursday February 8 2018 - 06:02:09

Menu not always centered


Poster: aptisman
Dated: Monday April 26 2004 - 19:30:50 BST

My menu is correctly positioned in IE6 but there seems to be a problem with it in Opera and Firefox 0.8.

If the page is not in the cache the menu is off-set to the left about an inch when it should be centered. On a reload or move to another page it appears correctly.

The URL is http://www.peterhead-methodist.org.uk/ and the menu code is as follows:-

_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=0 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset



with(menuStyle=new mm_style()){
onbgcolor="#ffdce7";
oncolor="#007900";
offbgcolor="#ffecea";
offcolor="#b05010";
bordercolor="#296488";
borderstyle="solid";
borderwidth=2;
separatorcolor="#2D729D";
separatorsize="1";
padding="4";
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
fontweight="bold";
pagecolor="black";
pagebgcolor="#91ccD7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="arrow.gif";
subimageheight="5";
subimagewidth="5";
subimagepadding="0 2 0 0";
}

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=20;
screenposition="center";
alwaysvisible=1;
followscroll="1";
orientation="horizontal";
aI("text=Home;url=http://www.peterhead-methodist.org.uk/;status=Back To Home Page;");
aI("text=About Us;showmenu=About Us;");
aI("text=How to Reach Us;showmenu=How to Reach Us;");
aI("text=Links;showmenu=Links;");
aI("text=Resources;showmenu=Resources;");
aI("text=Sunday Services;showmenu=Sunday Services;");
aI("text=Weekday Activities;showmenu=Weekday Activities;");
}

with(milonic=new menuname("About Us")){
style=menuStyle;
overflow="scroll";
aI("text=Care Line;url=http://www.peterhead-methodist.org.uk/prayerfm.htm;status=Care Line;");
aI("text=Contact Us;url=http://www.peterhead-methodist.org.uk/contact.htm;status=Contact Us;");
aI("text=Guest Book - Read;url=http://www.peterhead-methodist.org.uk/guestbk.htm;status=Read Guest Book;");
aI("text=Guest Book - Sign;url=http://www.peterhead-methodist.org.uk/input.htm;status=Sign Guest Book;");
aI("text=History of our church;url=http://www.peterhead-methodist.org.uk/history.htm;status=History of our church;");
aI("text=Magazine;url=http://www.peterhead-methodist.org.uk/newsltr.htm;status=Magazine;");
aI("text=Methodist Beliefs;url=http://www.peterhead-methodist.org.uk/beliefs.htm;status=Methodist Beliefs;");
aI("text=MFV Master of the Sea;url=http://www.peterhead-methodist.org.uk/mfv.htm;status=MFV Master of the Sea;");
aI("text=Mission Statement;url=http://www.peterhead-methodist.org.uk/mssnstat.htm;status=Mission Statement;");
aI("text=North of Scotland Mission Circuit;url=http://www.peterhead-methodist.org.uk/circ.htm;status=North of Scotland Mission Circuit;");
aI("text=Refurbishment;url=http://www.peterhead-methodist.org.uk/refurb.htm;status=Refurbishment;");
aI("text=Testimonies;url=http://www.peterhead-methodist.org.uk/testimonies.htm;status=Testimonies;");
}

with(milonic=new menuname("How to Reach Us")){
style=menuStyle;
aI("text=Contact Us;url=http://www.peterhead-methodist.org.uk/contact.htm;status=Contact Us;");
aI("text=Report a Dead Link;url=http://www.peterhead-methodist.org.uk/contact3.htm;status=Report a Dead Link;");
aI("text=Travel Directions;url=http://www.peterhead-methodist.org.uk/howto.htm;status=Travel Directions;");
}

with(milonic=new menuname("Links")){
style=menuStyle;
overflow="scroll";
aI("text=Peterhead Links;url=http://www.peterhead-methodist.org.uk/plinks.htm;status=Peterhead Links;");
aI("text=Other Links;url=http://www.peterhead-methodist.org.uk/olinks.htm;status=Other Links;");
}

with(milonic=new menuname("Resources")){
style=menuStyle;
overflow="scroll";
aI("text=23rd Psalm in Scottish;url=http://www.peterhead-methodist.org.uk/dundee.htm;status=23rd Psalm;");
aI("text=Alternative Lord's Prayer;url=http://www.peterhead-methodist.org.uk/lordsprayer.htm;status=Alternative Lord's Prayer;");
aI("text=Christmas;showmenu=Sub Menu 5;status=Christmas;");
aI("text=Easter;showmenu=Sub Menu 1;status=Easter;");
aI("text=Food Safety;url=http://www.peterhead-methodist.org.uk/foodhyg.htm;status=Food Safety;");
aI("text=God's Armour;url=http://www.peterhead-methodist.org.uk/armour.htm;status=God's Armour;");
aI("text=Help;showmenu=Sub Menu 2;status=Help;");
aI("text=Hymns;url=http://www.peterhead-methodist.org.uk/mhbp.htm;status=Hymns;");
aI("text=Inspiration;showmenu=Sub Menu 3;status=Inspiration;");
aI("text=Pentecost;url=http://www.peterhead-methodist.org.uk/pente.htm;status=Pentecost;");
aI("text=People;url=http://www.peterhead-methodist.org.uk/people.htm;status=People;");
aI("text=Topical Issues;showmenu=Sub Menu 4;status=Topical Issues;");
}

with(milonic=new menuname("Sunday Services")){
style=menuStyle;
aI("text=Preacher Details;url=http://www.peterhead-methodist.org.uk/preachers.htm;status=Preacher Details;");
aI("text=Services;url=http://www.peterhead-methodist.org.uk/service.htm;status=Services;");
}

with(milonic=new menuname("Weekday Activities")){
style=menuStyle;
aI("text=Alpha;url=http://www.peterhead-methodist.org.uk/alpha.htm;status=Alpha;");
aI("text=Boys' Brigade;url=http://www.peterhead-methodist.org.uk/bbs.htm;status=Boys' Brigade;");
aI("text='Open Doorie';url=http://www.peterhead-methodist.org.uk/opendoorie.htm;status='Open Doorie';");
aI("text=Youth Church;url=http://www.peterhead-methodist.org.uk/youth.htm;status=Youth Church;");
aI("text=Other Groups;url=http://www.peterhead-methodist.org.uk/action.htm;status=Other Groups;");
}

with(milonic=new menuname("Sub Menu 1")){
style=menuStyle;
overflow="scroll";
aI("text=The Crucifixion;url=http://www.peterhead-methodist.org.uk/easter.htm;status=The Crucifixion;");
aI("text=Women at the Tomb;url=http://www.peterhead-methodist.org.uk/easter2.htm;status=Women at the Tomb;");
aI("text=There is no body!;url=http://www.peterhead-methodist.org.uk/easter3.htm;status=There is no body!;");
aI("text=Jesus Appears;url=http://www.peterhead-methodist.org.uk/easter4.htm;status=Jesus Appears;");
}

with(milonic=new menuname("Sub Menu 2")){
style=menuStyle;
overflow="scroll";
aI("text=Care Line;url=http://www.peterhead-methodist.org.uk/prayerfm.htm;status=Care Line;");
aI("text=Don't Fret;url=http://www.peterhead-methodist.org.uk/help.htm;status=Don't Fret;");
aI("text=Don't Worry;url=http://www.peterhead-methodist.org.uk/help2.htm;status=Don't Worry;");
aI("text=How are you feeling?;url=http://www.peterhead-methodist.org.uk/help3.htm;status=THow are you feeling?;");
aI("text=Make Peace;url=http://www.peterhead-methodist.org.uk/help4.htm;status=Make Peace;");
}

with(milonic=new menuname("Sub Menu 3")){
style=menuStyle;
overflow="scroll";
aI("text=Be a servant;url=http://www.peterhead-methodist.org.uk/inspir.htm;status=be a servant;");
aI("text=Forgiving Attitude;url=http://www.peterhead-methodist.org.uk/inspir2.htm;status=Forgiving Attitude;");
aI("text=Moaning People;url=http://www.peterhead-methodist.org.uk/inspir3.htm;status=Moaning People");
}

with(milonic=new menuname("Sub Menu 4")){
style=menuStyle;
overflow="scroll";
aI("text=Are you going to heaven?;url=http://www.peterhead-methodist.org.uk/salvatn.htm;status=Are you going to heaven?;");
aI("text=Hallowe'en;url=http://www.peterhead-methodist.org.uk/hallow.htm;status=Hallowe'en;");
aI("text=Homes and Gardens;url=http://www.peterhead-methodist.org.uk/homes.htm;status=Homes and Gardens;");
aI("text=Jubilee Plus;url=http://www.peterhead-methodist.org.uk/jubi.htm;status=Jubilee Plus;");
}

with(milonic=new menuname("Sub Menu 5")){
style=menuStyle;
overflow="scroll";
aI("text=A Journey;url=http://www.peterhead-methodist.org.uk/travel.htm;status=A Journey;");
aI("text=St Nicholas;url=http://www.peterhead-methodist.org.uk/christm.htm;status=St Nicholas;");
}

with(milonic=new menuname("Sub Menu 6")){
style=menuStyle;
overflow="scroll";
aI("text=Travel Directions;url=http://www.peterhead-methodist.org.uk/howto.htm;status=Travel Directions;");
aI("text=Contact Us;url=http://www.peterhead-methodist.org.uk/contact.htm;status=Contact Us;");}

drawMenus();

I would appreciate some help with this - I have searched for previous similar topics but not found anything which helps.


Poster: Maz
Dated: Monday April 26 2004 - 21:10:21 BST

Where you have a digits only, don't use quotes eg.
subimageheight="5";
subimagewidth="5";

where you have screenposition="center";
try adding
menualign="center";

That was just a quick look, see if it helps.

maz


Poster: aptisman
Dated: Tuesday April 27 2004 - 15:15:18 BST

Sadly it did not help.


Poster: Maz
Dated: Tuesday April 27 2004 - 16:19:52 BST

subimagepadding="0 2 0 0";

try subimagepadding="0px 2px 0px 0px";

Sorry I'm not seeing anything obvious.

maz


Poster: aptisman
Dated: Tuesday April 27 2004 - 16:32:41 BST

Sorry, that has not helped either.

One thing I have noticed is that when the menu first appears it is very briefly without the arrow graphic and it is centered. It's when the graphic appears that it moves to the left.


Poster: John
Dated: Tuesday April 27 2004 - 19:47:23 BST

You still have a few numeric items in the _data file with "" around them. Probably not the problem, but they aren't necessary.

Also, I just looked at the site with Opera 7.23 and did not see the problem you describe about the arrow graphic. Everything popped in instantly with no movement at all.

What version are you running? We've have a few instances lately of slightly down-level versions of Opera causing problems (e.g., 7.21, etc.).


Poster: aptisman
Dated: Tuesday April 27 2004 - 22:35:54 BST

I have tried this menu in Opera 7.50b1 also Firefox 0.8 and I see the same problem.

Following on from what I said above about the shift when the graphic loads, to test this I have deleted all reference to the subimage and the problem has gone away, so it seems therein lies the problem!

If I tried a different image I wonder if that would help? In this connection are any of the other arrows etc you use in other menus downloadable separately?