hallo!
Hab ein vertikales Menü erstellt mit einer 2 Ebene und möchte einerseits den aktiven Hauptmenüpunkt und den ausgewählten Untermenüpunkt hervorheben.
Aber verflixterweise hebt er mir nicht nur den Hauptmenüpunkt wie gewollt sondern auch ALLE Untermenüpunkte hervor. Hover sollte passen. Dennoch.
Hab keinen Plan mehr.
thx
HTML-Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Navi Vertikal mit 2 Ebene</title>
<link href="navi_vertikal_21.css" rel="stylesheet" type="text/css" />
</head>
<body id="seite0201">
<div id="container">
<div id="navibox">
<ul>
<li id="navi01"><a href="navi_vertikal_2.html">Startseite</a></li>
<li id="navi02"><a href="navi_vertikal_2_Seite02.html">Seite 02</a>
<ul>
<li id="navi0201"><strong>Seite 0201</strong></li>
<li id="navi0202"><a href="navi_vertikal_2_Seite0202.html">Seite 0202</a></li>
<li id="navi0203"><a href="navi_vertikal_2_Seite0203.html">Seite 0203</a></li>
<li id="navi0204"><a href="navi_vertikal_2_Seite0204.html">Seite 0204</a></li>
</ul>
</li>
<li id="navi03" title="Infos zu Seite 03"><a href="navi_vertikal_2_Seite03.html">Seite 03</a></li>
<li id="navi04" title="Infos zu Seite 04"><a href="navi_vertikal_2_Seite04.html">Seite 04</a></li>
</ul>
</div><!--ende navibox-->
</div><!--ende container-->
</body>
</html>
HTML-Code:
body {
padding: 0;
margin: 0;
background-color: #ffffff;
}
#container {
width: 600px;
height: 600px;
border: 1px solid black;
margin: 100px auto;
padding: 0px;
background-color: #FFFFFF;
}
#navibox {
/*background-color: #CCCCCC;*/
background-color: transparent;
position: relative;
top: 0;
left: 10px;
margin: 0;
}
#navibox li {
list-style: none;
background-color: transparent;
padding: 0;
margin: 0;
/*width: 200px;*/
text-align: center;
}
#navibox ul {
background-color: transparent;
padding: 0;
margin: 0;
}
/*
#navibox a {
text-decoration: none;
width: 198px; /*nur für IE 6
padding: 3px 4px;
margin: 1px 0 0;
width: 200px;
border-radius: 5px;
-moz-border-radius: 5px;
}*/
/*Liste in Ebene 2*/
#navibox li ul {
font-size: 90%;
/*border-top: none;
border-bottom: none; */
margin: 0;
}
#navibox li li {
padding: 0;
margin: 0;
}
/* Gestaltung Hyperlinks fuer Ebene 1 und Strong */
#navibox a,
#navibox strong {
display: block;
width: 200px;
font-weight: normal;
text-decoration: none;
background-color: #FFFFFF;
color: #000000;
padding: 3px 4px;
margin: 1px 0 0;
border: 1px solid #990000;
border-radius: 5px;
-moz-border-radius: 5px;
}
/* Hover und Focus */
#container #navibox a:hover,
#container #navibox a:focus {
background-color: #990000;
color: white;
}
/* Gestaltung der Links fuer Ebene 2 */
#navibox li li a,
#navibox li li strong {
background-color: #FFFFFF;
color: #000000;
width: 150px;
margin: 1px 0 0 50px;
}
/* Aktive Menuepunkte hervorheben */
#startseite #navi01 strong,
#seite02 #navi02 strong,
#seite0201 #navi0201 strong,
#seite0202 #navi0202 strong,
#seite0203 #navi0203 strong,
#seite0204 #navi0204 strong,
#seite03 #navi03 strong,
#seite0302 #navi0302 strong,
#seite04 #navi04 strong {
background: #990000;
color: #FFFFFF;
}
/* Hauptmenuepunkt hervorheben */
#seite0201 #navi02 a,
#seite0202 #navi02 a,
#seite0302 #navi03 a {
background-color: #990000;
color: #FFFFFF;
}
navi_vertikal_21.txt
navi_vertikal_2_Seite0201.txt