Ich habe Probleme, das Untermenü auf meiner Navigationsleiste korrekt anzuzeigen - der Schwebeflug scheint nicht über dem richtigen Link ("Medien") sondern dazwischen zu liegen, und das Dropdown zeigt an rechts und nicht unter "Medien" verlinken.Nav bar Untermenü
Alle Vorschläge dankbar erhalten.
HTML:
<nav>
<ul>
<li><a href="index.php" title="home">Home</a></li>
<li><a href="about.php" title="Find out more">About</a></li>
<li><a href="testimonials.php" title="What my students say">Testimonials</a></li>
<li><a>Media</a>
<ul>
<li><a href="photos.php">Photos</a></li>
<li><a href="videos.php">Videos</a></li>
</ul>
</li>
<li><a href="contact.php" title="Get in contact">More Info</a></li>
</ul>
</nav>
css hier:
nav ul {
background-color: black;
text-align: center;
}
nav ul li {
display: inline-block;
padding: 10px;
}
nav ul li a {
color: white;
text-decoration: none;
}
nav ul ul {
display: none;
}
nav ul li:hover > ul {
display: block;
position: absolute;
}
nav ul ul li {
display: block;
}