Und bevor wir uns jetzt Daten und CSS zusammenraten, stellt Christian bitte einfach ein vollstaendiges, auf's Wesentliche reduziertes, valides Online-Beispiel bereit.
MfG ChrisB
No Problem, das CSS ist ziemlich genau das von der SELFHTML-Seite zum Formatieren von dynamischen Menüs.
Geändert ist nur, daß nicht die IDs sondern die Klassen formatiert werden, bzw. Vorgabebreiten.
ul.Navigation {
width: 13em;
margin: 0; padding: 0.8em;
background-color: transparent;
}
* html ul.Navigation { /* Korrekturen fuer IE 5.x */
width: 14.6em;
w\idth: 13em;
padding-left: 0;
padd\ing-left: 0.8em;
}
ul.Navigation li {
list-style: none;
margin: 0.0em; padding: 0;
border: 1px solid black;
}
ul.Navigation li ul {
margin: 0 0 0 1em; padding: 0;
}
ul.Navigation li ul li {
margin: 0.1em 0;
}
* html ul.Navigation li ul li { /* Korrektur fuer IE 5.x */
margin-left: 1em;
ma\rgin-left: 0;
}
ul.Navigation a {
display:block;
padding: 0.2em;
text-decoration: none; font-weight: bold;
border: 1px solid black;
border-left-color: white; border-top-color: white;
color: maroon; background-color: #ccc;
}
* html ul.Navigation a {
width: 100%; /* Breitenangabe fuer IE 5.x */
w\idth: 12em; /* Breitenangabe fuer IE 6 */
}
* html ul.Navigation li ul li a {
width: 100%; /* Breitenangabe fuer IE 5.x */
w\idth: 12em; /* Breitenangabe fuer IE 6 */
}
ul.Navigation a:hover {
border-color: white;
border-left-color: black; border-top-color: black;
color: maroon; /*background-color: gray;*/
}
Die Daten hab ich auf zwei Menüs (ein Haupt- und ein Untermenü) beschränkt.
var oMenu = new Array;
oMenu[0] = new Object();
oMenu[0].Id = "Main";
oMenu[0].Name = "Hauptmenü";
oMenu[0].bk_url = "url('../assets/images/style/btn1.gif')";
oMenu[0].sMenu = "home;Home;./html/body_index.html|dl;Dienstleistungen;$1|srv;Servicleistungen;./html/body_service.html|agb;AGBs;./html/body_agb.html|about;Über WeSoft;./html/body_about.html|kon;Kontakt;./html/body_kontakt.html";
oMenu[0].men_direction = "hor";
oMenu[0].nam_direction = "center";
oMenu[0].men_x = 10;
oMenu[0].men_y = 30;
oMenu[0].men_width = 150;
oMenu[0].men_height = 20;
oMenu[0].men_base = "top";
oMenu[0].font_Face = "arial";
oMenu[0].font_Weight = "bold";
oMenu[0].font_Size = 14;
oMenu[0].indent = 0;
oMenu[0].popup = false;
oMenu[1] = new Object();
oMenu[1].Id = "DLMenu";
oMenu[1].Name = "Dienstleistungen";
oMenu[1].bk_url = "url('../assets/images/style/btn1.gif')";
oMenu[1].sMenu = "kon;Kontakt;./html/body_kontakt.html|dl;Dienstleistungen;./html/body_dl.html";
oMenu[1].men_direction = "vertical";
oMenu[1].nam_direction = "left";
oMenu[1].men_x = 180;
oMenu[1].men_y = 0;
oMenu[1].men_width = 140;
oMenu[1].men_height = 14;
oMenu[1].men_base = "bottom";
oMenu[1].font_face = "arial";
oMenu[1].font_Weight = "bold";
oMenu[1].font_Size = 12;
oMenu[1].indent = 20;
oMenu[1].popup = true;
var men_posArt;
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion.substr(0,1)) < 7))
men_posArt = "absolute";
else
men_posArt = "fixed";