johnny_theknife
04-22-2006, 09:15 AM
Hi All,
I seem to have come upon an issue with differances between IE and Firefox. I have developed as a test an expanding menu, which will run down the left hand side of the page. When the mouse is hovered over a menu item, a div will apear to the left with submenus.
This works as expected in IE, the submenus appear to the right of the primary menu item, in Firefox, it appears below the primary menu item. The code is below:
From the stylesheet:
.clsMenu
{
border:solid 1;
border-color:khaki olive olive khaki;
background-color:#ff9900;
position:absolute;
display:none;
padding:1px;
width:180px;
z-index:1;
padding-left:5px;
font-family:ariel;
font-size:10pt;
text-align:left;
}
And from the page:
<head>
<title>Ocean Computing Solutions</title>
<link href="./styles/oceanweb.css" type="text/css" rel="stylesheet">
<script language="javascript">
var strActiveMenu = ""
function ShowMenu(sMenuID)
{
document.all[sMenuID].style.display = 'block';
}
function HideMenu(sMenuID)
{
setTimeout("DoHide('"+sMenuID+"')",250);
}
function DoHide(sMenuID)
{
if (strActiveMenu=="") {
document.all[sMenuID].style.display = "none";
}
}
function ActiveMenu(sMenuID, sDeactivate)
{
if (sDeactivate=="1") {
strActiveMenu=""
setTimeout("DoHide('"+sMenuID+"')",100);
} else {
strActiveMenu=sMenuID;
}
}
</script>
</head>
<body>
<table border = 1 width = 100px>
<tr><td><a onmouseover="ShowMenu('menu1')" onmouseout="HideMenu('menu1')" href="#">Menu 1</a> <div class="clsMenu" id="menu1" onmouseover="ActiveMenu('menu1')" onmouseout="ActiveMenu('menu1', '1')">Item 1<br>Item2</div></td></tr>
</table>
</body>
</html>
Apologies for the sucky formatting. I'm sure this is something simple to resolve, but it annoying me quite deeply at the moment.
Thanks,
JK
I seem to have come upon an issue with differances between IE and Firefox. I have developed as a test an expanding menu, which will run down the left hand side of the page. When the mouse is hovered over a menu item, a div will apear to the left with submenus.
This works as expected in IE, the submenus appear to the right of the primary menu item, in Firefox, it appears below the primary menu item. The code is below:
From the stylesheet:
.clsMenu
{
border:solid 1;
border-color:khaki olive olive khaki;
background-color:#ff9900;
position:absolute;
display:none;
padding:1px;
width:180px;
z-index:1;
padding-left:5px;
font-family:ariel;
font-size:10pt;
text-align:left;
}
And from the page:
<head>
<title>Ocean Computing Solutions</title>
<link href="./styles/oceanweb.css" type="text/css" rel="stylesheet">
<script language="javascript">
var strActiveMenu = ""
function ShowMenu(sMenuID)
{
document.all[sMenuID].style.display = 'block';
}
function HideMenu(sMenuID)
{
setTimeout("DoHide('"+sMenuID+"')",250);
}
function DoHide(sMenuID)
{
if (strActiveMenu=="") {
document.all[sMenuID].style.display = "none";
}
}
function ActiveMenu(sMenuID, sDeactivate)
{
if (sDeactivate=="1") {
strActiveMenu=""
setTimeout("DoHide('"+sMenuID+"')",100);
} else {
strActiveMenu=sMenuID;
}
}
</script>
</head>
<body>
<table border = 1 width = 100px>
<tr><td><a onmouseover="ShowMenu('menu1')" onmouseout="HideMenu('menu1')" href="#">Menu 1</a> <div class="clsMenu" id="menu1" onmouseover="ActiveMenu('menu1')" onmouseout="ActiveMenu('menu1', '1')">Item 1<br>Item2</div></td></tr>
</table>
</body>
</html>
Apologies for the sucky formatting. I'm sure this is something simple to resolve, but it annoying me quite deeply at the moment.
Thanks,
JK