Hallo,
ich habe ein DropDown Menü nach (fast) meinen Vorstellungen...das einzige ist, dass es im IE noch nicht so will wie ich ![tongue :P](https://www.forum-hilfe.de/images/smilies/emojione/1f61b.png)
Wenn man das Menü 'normal' aufruft, also einfach Pfad eintippen, funktioniert alles einwandfrei! Wenn ich nun das Menü inlude() hab ich folgendes Problem:
Wenn man über den ersten Untermenüpunkt mit der Maus nach unten geht, klappt das Menü wieder ein, aber seht selbst was ich meine:
> das Menü:
http://www.power4sport.at/tests/navi.php
> Menü included:
http://www.power4sport.at/tests/testmain.php
...hab keine Ahnung was ich da machen kann um das hinzubiegen, bitte um Hilfe ![Wink :wink:](https://www.forum-hilfe.de/images/smilies/icon_wink.gif)
Hier noch der Code fürs MenÜ:
<html>
<head>
....
<link rel="stylesheet" type="text/css" href="dropdownmenu.css" />
</head>
<script type="text/javascript" src="css_dropdown.js"></script>
<body topmargin="0" leftmargin="230">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="100%">
<p align="center">
<style>
body
{
font-family:verdana;
}
ul.dropdown a
{
background-color:#;
color:#444;
padding-right:6px;
padding-top:3px;
padding-bottom:3px;
padding-left:6px;
text-decoration:none;
}
ul.dropdown a:hover
{
background-color:#444; // hintergrund farbänderung bei hover
color:#fff;
}
ul.dropdown ul
{
border:1px outset;
}
ul.dropdown ul a
{
background-color:#fff; //hintergund dropdown
color:#fff;
padding:1px;
text-decoration:none;
}
ul.dropdown ul a:hover
{
background-color:#f0f0f0;
color:#000;
}
ul.dropdown ul li
{
background-color:#fff;
}
</style>
<body onload="enableDropdownMenuForIE();">
<ul class="dropdown" id="mainmenu">
[*]
[b][url='#']<font style="font-size: 8pt">NEWS</font>[/url]<font style="font-size: 8pt"> </font>
[/b]
<ul>
[*][b]<a href="">
<font style="font-size: 8pt">Angebote</font></a>[/b][*]
[b]<a href="">
<font style="font-size: 8pt">Events</font></a>[/b][*][b]<a href="">
<font style="font-size: 8pt">Irgendwas</font></a>[/b][/list]
[*]
[b]
<a href="">
<font style="font-size: 8pt">PRODUKTE</font></a><font style="font-size: 8pt"> </font>[/b]
<ul>
[*][b]<a href="">
<font style="font-size: 8pt">Metadaten</font></a>[/b][*]
[b]<a href="">
<font style="font-size: 8pt">Grundeigenschaften</font></a>[/b][*]
[b]<a href="">
<font style="font-size: 8pt">Standardtemplates</font></a>[/b][*]
[b]<a href="">
<font style="font-size: 8pt">Zugriffsrechte</font></a>[/b] [/list]
[*]
[b]
<a href="">
<font style="font-size: 8pt">UNTERNEHMEN</font></a><font style="font-size: 8pt"> </font>[/b]
<ul>
[*][b]<a href="#" class="has_submenu">
<font style="font-size: 8pt">Seitenleiste</font></a><font style="font-size: 8pt">
</font>[/b]
<li class="seperator">[b]<a href="">
<font style="font-size: 8pt">Kindobjekte</font></a>[/b]
[*][b]<a href="" rel="top">
<font style="font-size: 8pt">Webseite</font></a>[/b]
[/list]
[*]
[b]
<a href="">
<font style="font-size: 8pt">DIENSTLEISTUNGEN</font></a><font style="font-size: 8pt"> </font>
[/b]
<ul>
[*][b]<a href="" class="has_submenu">
<font style="font-size: 8pt">Benutzermanager</font></a>
[/b]
[*]
[b]
<a href="#" class="has_submenu">
<font style="font-size: 8pt">Cache</font></a><font style="font-size: 8pt">
</font>[/b]
[*][b]<a href="">
<font style="font-size: 8pt">Papierkorb</font></a>[/b]
[/list]
[*][b][url='#']<font style="font-size: 8pt">SHOP</font>[/url][/b]<ul>
[*][b]
<font style="font-size: 8pt">
[url='']Inhaltsverzeichnis[/url]</font>[/b]
[/list]
[/list]</td>
</tr>
</table>
</body>
</html>
Alles anzeigen
Hier noch die JS-Datei:
function enableDropdownMenuForIE()
{
if (document.all)
{
uls = document.getElementsByTagName('UL');
for(i = 0; i < uls.length; i++)
{
if (uls[i].className == 'dropdown')
{
var lis = uls[i].getElementsByTagName('li');
for (j = 0; j < lis.length; j++)
{
if(lis[j].lastChild.tagName == 'UL')
{
lis[j].onmouseover = function() { this.lastChild.style.display = 'block'; }
lis[j].onmouseout = function() { this.lastChild.style.display = 'none'; }
}
}
}
}
}
}
Alles anzeigen
Lg Dani