Menu positioning issue with Opera 9.50 only (menu ver 5.796)

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
cmanley
Advanced
Advanced
Posts: 12
Joined: Sat May 13, 2006 3:35 am

Menu positioning issue with Opera 9.50 only (menu ver 5.796)

Post by cmanley »

Hi,

I'm using Milonic menu's version 5.796 in a new site I'm building. The menu's work just fine in IE6, IE7, Firefox 2, Firefox 3, and Opera 9.27, but not in Opera 9.50.
In Opera 9.50 the submenu's are very offset.
It's a very simple site actually. The menu is in a div that's located with in a container div. The container div is centered in the body and offset from the body top by a fixed distance.
Below is the relevant CSS, HTML, and Milonic code.

Thanks,
Craig Manley

The relevant CSS:

Code: Select all

/* The container I mentioned (not to be confused with html frames btw): */
#frame {
	margin-left: auto; margin-right: auto;
	position: relative;
	padding: 10px 10px 0 10px;
	top: 120px;
	width: 910px;
}
/* The menu sits in this and this sits in the #frame container: */
#menubar {
	height: 40px;
	background: url(/menu/main_inactive.gif) repeat-x;
	position: relative;
}
The relevant HTML:

Code: Select all

<body>
<div id="frame">
	<div id="menubar">
		<script type="text/javascript" src="/menu/menuLoggedOut.js"></script>
	</div>
	<div>Content bla bla</div>
</div>
</body>

The relevant Milonic code:

Code: Select all

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;

with(menuStyle=new mm_style()){
styleid=1;
fontfamily="Arial, Helvetica, sans-serif";
fontsize="14px";
offcolor="#fff";
oncolor="#a4cb88";
overbgimage="/menu/main_active.gif";
bgimage="/menu/main_inactive.gif";
rawcss="padding-left: 20px; padding-right: 20px";
separatorimage="/menu/main_sep.png";
separatorsize=1;
}

with(submenuStyle=new mm_style()){
styleid=2;
fontfamily="Arial, Helvetica, sans-serif";
fontsize="11px";
offcolor="#fff";
offbgcolor="#01a8e1";
oncolor="#a4cb88";
onbgcolor="#000";
onborder="1px solid #01a8e1";
rawcss="padding-left: 20px; padding-right: 20px";
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
itemheight=39;
//itemwidth=181;
//minwidth
orientation="horizontal";
style=menuStyle;
aI("align=center;showmenu=Bedrijf;text=Bedrijf;");
aI("align=center;showmenu=Producten;text=Producten;");
aI(""); // force closing seperator
}

with(milonic=new menuname("Bedrijf")){
itemheight=25;
orientation="vertical";
style=submenuStyle;
aI("align=left;text=Virtuele rondleiding;url=/content.php?key=Virtuele%20rondleiding;");
aI("align=left;text=Historie;url=/content.php?key=Historie;");
aI("align=left;text=Missie / Visie;url=/content.php?key=Missie%20/%20Visie;");
}

with(milonic=new menuname("Producten")){
itemheight=25;
orientation="vertical";
style=submenuStyle;
aI("align=left;text=Medicatierol;url=/content.php?key=Medicatierol");
aI("align=left;text=Implementatie-module;url=/content.php?key=Implementatie-module;");
}
Last edited by cmanley on Wed Jun 25, 2008 12:07 am, edited 2 times in total.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Menu positioning issue with Opera 9.50 only (menu ver 5.796)

Post by Ruth »

Hi,

The problem is from the css. I will post to Milonic, but it is coming from the #frame css

Code: Select all

POSITION: relative; TOP: 120px
The submenus are being shifted down that 120px. I am trying to figure out how to set it up so that doesn't happen in Opera.

Ruth
cmanley
Advanced
Advanced
Posts: 12
Joined: Sat May 13, 2006 3:35 am

Re: Menu positioning issue with Opera 9.50 only (menu ver 5.796)

Post by cmanley »

I got it to work in Opera 9.50 by just adding this line to the list of globals:

Code: Select all

buildAfterLoad=true; // For Opera 9.50.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Menu positioning issue with Opera 9.50 only (menu ver 5.796)

Post by Ruth »

That's great. Thanks so much for posting the solution, it is really appreciated :)

Ruth
Post Reply