Click to See Complete Forum and Search --> : Problem with IFrame


CGG
01-16-2006, 07:47 AM
How can i let my navigation menu go over the IFrame, now when I navigate the menu, it's not totally visible


<html >
<head>
<title></title>

<script type="text/javascript">
<!--
window.onload=show;
function show(id) {
var d = document.getElementById(id);
for (var i = 1; i<=10; i++) {
if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
}
if (d) {d.style.display='block';}
}
//-->
</script>

<style type="text/css">
<!--
body {
background: white;
padding:0;
margin:0;
font-family: sans-serif;
font-size: 70%;
color: black;
}


dl, dt, dd, ul, li {
margin: 0;
padding: 0;
list-style-type: none;
}
#menu {
position: absolute;
top: 1em;
left: 1em;
width: 10em;
}

#menu dt {
cursor: pointer;
background: #990000;
height: 20px;
line-height: 20px;
margin: 2px 0;
border: 1px solid gray;
text-align: left;
font-weight: bold;
}

#menu dd {
position: absolute;
z-index: 100;
left: 8em;
margin-top: -1.4em;
width: 10em;
background: #990000;
border: 1px solid gray;
}

#menu ul {
padding: 2px;
}
#menu li {
text-align: left;
font-size: 100%;
height: 18px;
line-height: 18px;
}
#menu li a, #menu dt a {
color: White;
text-decoration: none;
display: block;
}

#menu li a:hover {
font-weight: bold;
}

#menu dt a:hover {
text-decoration: underline;
}

.iframe {
position: absolute;
left: 125px;
top: 50px;
}


-->
</style>

</head>
<body>
<!-- BEGIN Menu -->
<dl id="menu">
<dt onmouseover="javascript:show('smenu1');" onmouseout="javascript:show();"><a href="#">HOMEPAGINA</a></dt>
<dt onmouseover="javascript:show('smenu2');" onmouseout="javascript:show();"><a href="#">HISTORIEK</a></dt>
<dt onmouseover="javascript:show('smenu3');" onmouseout="javascript:show();"><a href="#">WORKSHOPS</a></dt>
<dd id="smenu3" onmouseover="javascript:show('smenu3');" onmouseout="javascript:show();">
<ul>
<li><a href="#">Inhoud</a></li>
<li><a href="#">Overzicht</a></li>
<li><a href="#">Nieuw</a></li>
<li><a href="#">Recepten</a></li>
</ul>
</dd>

<dt onmouseover="javascript:show('smenu4');" onmouseout="javascript:show();"><a href="#">FOTOS</a></dt>
<dt onmouseover="javascript:show('smenu5');" onmouseout="javascript:show();"><a href="#">INSCHRIJVINGEN</a></dt>
</dl>
<!-- END Menu -->
<iframe name="content" src="x.html" width="800px" height="100%" allowtransparency="true" frameborder="1" class="iframe" scrolling=no></iframe>
</body>
</html>

Fang
01-16-2006, 07:57 AM
Give #menu z-index:1; and .iframe z-index:0;

This will not work in Opera and there is no fix!