Hey I would like to have a dropdown sub- menu in the same style, I know it's simple but I'm still new to making websites and I can't figure it out by myself.
here's my HTML file:
<nav>
<ul>
<li><a href="./index.html"><span class ="s2">Startpagina</span></a></li>
<li><a href="./aanwinsten.html">Aanwinsten</a></li>
<li><a href="./catalogus.html">Catalogus</a></li>
<ul class="sub">
<li><a href="#">Pages</a></li>
<li><a href="#">Archives</a></li>
<li><a href="#">New Posts</a></li>
</ul>
<li><a href="./uitlening.html">Uitlening</a></li>
<li><a href="./reservatie.html">Reservatie</a></li>
<li><a href="./suggestie.html">Suggestie</a></li>
<li><a href="./contact.html">Contact</a></li>
</ul>
</nav>
and this is my CSS file:
nav li
{
display: inline;
padding-right: 20px;
}
nav {
text-align: center;
margin: -20px 0px 0px 0px;
}
nav ul{
background-color: rgba(126, 4, 0, 0.79);
border: 1px solid black;
}
nav ul li{
display: inline;
}
nav ul li a{
padding-left: 1em;
padding-right: 1em;
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
text-decoration: none;
color: lightgray;
}
nav ul li a:hover{
color: #999999;
}
EDIT: I've edited the /li problem and I've added this to my CSS:
nav ul ul{display: none; position: relative;}
nav li ul li{float:none;display: inline-block; }
nav ul li:hover ul {display: inline-block;}
which gives this when I hoover over it: http://gyazo.com/e095151ebf644b4b44c7556193328163