My first post so go easy on me...I'm having a problem with submenus and their postion in relation to the parent. It appears what is causing the problem is a css that I have defined for the web project that I'm working on.
Here's a site that has what I'm talking about: http://www.venomdirect.com/menu.htm And the code fragments that show the problem are below. Without the css file the demo menu works fine...with the css file the submenus have bad offsets.
The problem has got to be in the top and left values within the lh-col section of the css I just don't know how to fix it.
TIA!
Code: Select all
css:
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<pre>#hdr{
height:30px;
background:#9D9C63;
color:#000000;
border:solid #000000;
border-width:2px 0px;
margin:40px 0 0 0;
}
#lh-col{
position: absolute;
top: 160px;
left: 20px;
width: 180px;
margin: 0;
padding: 0;
}
#rh-col{
margin: 8px 20px 20px 200px;
border: 2px solid #000000;
background: #ffffff;
color: #333333;
position :relative;
padding: 20px;
}
</pre>
</body>
</html>
------------------------------------
menu.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="my.css" />
</head>
<div id="lh-col">
<body>
<!-- left column -->
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="vertical_data.js" type=text/javascript></SCRIPT>
</body>
</div>
</html>
---------------------------------------
vertical_data.js:
_scrollAmount=3 // Used for Netscape 4 scrolling
_scrollDelay=20 // Used for Netscape 4 scrolling
_menuCloseDelay=500 // The delay for menus to remain visible on mouse off
_menuOpenDelay=150 // The delay for opening menus on mouse over
//_followSpeed=0 // Follow Scrolling speed (higher number makes the scrolling smoother but slower)
//_followRate=0 // Follow Scrolling Rate (use a minimum of 40 or you may experience problems)
_subOffsetTop=5; // Sub menu offset Top position
_subOffsetLeft=-10; // Sub menu offset Left position
with(mainStyle=new mm_style()){
onbgcolor = "#6699cc";
oncolor = "#00ffff";
offbgcolor = "#3366cc";
offcolor = "#ffff66";
bordercolor = "black";
borderstyle = "solid";
separatorcolor = "black";
separatorsize = 1;
padding = 4
onborder="2px solid black"
fontsize = "75%";
fontstyle = "normal";
fontweight = "normal";
fontfamily = "verdana, tahoma, arial";
high3dcolor = null; // Not sure if this will be included in final release
low3dcolor = null; // Not sure if this will be included in final release
pagecolor = "purple";
pagebgcolor = "pink";
topbarimage = "images/arrowdn.gif";
topbarimageloc = "center;middle"
subimage = "images/arrow.gif";
subimageloc = "center;middle"
//ondecoration = "underline"
//onbold = true;
//onitalic = true;
}
with(milonic=new menuname("mainmenu2")){_c=1
top = 24;
left = 3;
//itemwidth=60
//menuwidth="99%";
borderwidth = 1;
//screenposition = "center;middle";
//alignment="center";
style = mainStyle;
alwaysvisible = 1;
followscroll = "1,50,2"
//orientation="horizontal"
//filter = null;
//followscroll = null;
//keepalive = 1;
//overallwidth = null;
//righttoleft = null;
//itemheight=200;
//openonclick = null;
//bgimage="winxp_back.gif";
//position="relative"
//separatorcolor="green";
aI("itemwidth=200;text=Milonic Home Page;url=http://milonic.com/");
aI("text=Support;showmenu=support menu");
aI("text=Local Samples;showmenu=LOCALSAMPLES");
aI("text=Online Samples;showmenu=onlinesamples");
}
with(milonic=new menuname("support menu")){_c=1
borderwidth = 1;
style = mainStyle;
overfilter="Fade(duration=0.2);Shadow(color='#777777', Direction=135, Strength=5)"
outfilter="randomdissolve(duration=0.2);Shadow(color='#777777', Direction=135, Strength=5)"
aI("text=Milonic Disussion Forum;url=http://milonic.com/menu/forum");
aI("text=Menu Support Mailing List;url=/mailman/listinfo/menu-dev;target=_blank");
aI("text=Paid Support Page;url=http://milonic.com/menu/reqhelp.php");
aI("text=Frequently Asked Questions;url=http://milonic.com/menu/faq.php");
aI("text=Version Information;url=http://milonic.com/menu/versioninfo.php");
aI("text=Licensing;showmenu=licensing");
}
with(milonic=new menuname("licensing")){_c=1
borderwidth = 1;
itemwidth=200;
alignment="center";
style = mainStyle;
margin=3
overfilter="Fade(duration=0.2);Shadow(color='#777777', Direction=135, Strength=5)"
outfilter="randomdissolve(duration=0.2);Shadow(color='#777777', Direction=135, Strength=5)"
aI("text=License Agreement;url=http://milonic.com/menu/license.php");
aI("text=Purchase a License In Order To use This Menu;url=http://www.milonic.co.uk/menu/supportcontracts.php");
aI("text=Milonic's Privacy Policy;url=http://milonic.com/menu/privacy.php");
aI("text=Contact Milonic Solutions;url=http://milonic.com/menu/privacy.php;");
}
with(milonic=new menuname("localsamples")){_c=1
itemwidth = 200;
borderwidth = 1;
style = mainStyle;
margin=3
overfilter="Fade(duration=0.2);Shadow(color='#777777', Direction=135, Strength=5)"
outfilter="randomdissolve(duration=0.2);Shadow(color='#777777', Direction=135, Strength=5)"
aI("text=Horizontal Menu;url=horizontal.htm");
aI("text=Vertical Menu;url=menu.htm");
aI("text=XP Style Menu;url=xpmenu.htm");
aI("text=Embedded Inside a Table;url=table.htm");
aI("text=Relatively Positioned Menu;url=relative.htm");
aI("text=Right To Left;url=rtl.htm;");
}
with(milonic=new menuname("OnlineSamples")){_c=1
borderwidth = 1;
style = mainStyle;
overfilter="Fade(duration=0.2);Shadow(color='#777777', Direction=135, Strength=5)"
outfilter="randomdissolve(duration=0.2);Shadow(color='#777777', Direction=135, Strength=5)"
aI("text=None Been Done yet Folks, Sorry<br><br>More will follow shortly;type=header");
}
for(_a=_mnucnt;_a<_m.length;_a++){_drawMenu(_a)}