Hallo,
habe folgendes Problem:
Ich habe ein JavaScript das ein Menü "ausfährt".
Wenn das Menü übergroß ist verschieben sich allerdings die Div die darunterliegen nach unten. Ich möchte allerdings das das Menü "darüber" fährt.
Hier der Code:
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-script-type" content="text/javascript">
<meta http-equiv="content-style-type" content="text/css">
<title>Foldoutmenue Horizontal</title>
<style type="text/css" media="screen">
<!--
body
{
font-family: Verdana, sans-serif;
font-size: 14px;
overflow: auto;
padding: 10px;
margin: 0px;
}
ul, li
{
list-style-type: none;
padding: 0px;
margin: 0px;
}
.menu
{
top: 10px;
}
.menu li
{
width: 140px;
}
.menu a
{
border: 1px solid #888;
background-color: #fff;
text-decoration: none;
text-align: center;
font-weight: bold;
cursor: default;
margin: 0px 2px;
display: block;
height: 20px;
color: #000;
}
.menu a:hover
{
background-color: #ccc;
}
#smenu1
{
font-size: 12px;
display: none;
width: 140px;
float: left;
}
#smenu1 a
{
font-weight: normal;
padding-top: 2px;
border-top: 0px;
cursor: pointer;
}
//-->
</style>
<script type="text/javascript">
<!--
function montre(id)
{
with (document)
{
if (getElementById)
getElementById(id).style.display = 'block';
else if (all)
all[id].style.display = 'block';
else
layers[id].display = 'block';
}
}
function cache(id)
{
with (document)
{
if (getElementById)
getElementById(id).style.display = 'none';
else if (all)
all[id].style.display = 'none';
else
layers[id].display = 'none';
}
}
//-->
</script>
</head>
<body>
<div class="menu" style="border:1px solid black">
<ul>
[*][url='javascript:void(0);']Menu 1[/url]
<ul id="smenu1" onmouseover="montre('smenu1');" onmouseout="cache('smenu1');">
[*][url='']Subkategorie 1.1[/url]
[*][url='']Subkategorie 1.2[/url]
[*][url='']Subkategorie 1.3[/url]
[/list]
[/list]
</div>
<div style="border:1px solid black">
adfghjkläölkjhsdfghjk
</div>
</body>
</html>
Alles anzeigen
Ist ein simples Bsp.
MfG J.