Being fairly new to HTML and CSS, I have been struggling with my nav bar. Despite multiple attempts to fix it, the dropdown items do not appear when hovered over. Changing display: none; to display:block; only results in the items dropping down to the next line instead of appearing underneath the item. Any constructive criticism would be greatly appreciated so that I can learn and improve. Thank you in advance!
html, body {
margin: 0;
height: 100%;
width: 100%;
background-color: #0E0B16;
}
#wrap {
height: auto;
width: 100%;
border-bottom-style: solid;
border-bottom-color: #E7DFDD;
border-bottom-width: thin;
}
ul {
padding: 0;
margin: 0;
text-align: justify;
background: #0E0B16;
}
li {
list-style: none;
display: inline-block;
text-align: left;
}
a {
color: #E7DFDD;
text-decoration: none;
display: block;
margin-left: -4px;
padding: 16px 25px;
font-family: Verdana;
font-weight: bold;
border-right-style: solid;
border-right-color: #E7DFDD;
border-right-width: thin;
}
a:hover {
background-color: #E7DFDD;
color: #0E0B16;
}
a:active {
background-color: #E7DFDD;
color: #0E0B16;
}
.active {
background-color: #E7DFDD;
color: #0E0B16;
}
.dropdown-content {
display: none;
}
.dropdown:hover .dropdown-content{
display: block;
}
<!DOCTYPE html>
<html>
<head>
<title>Witcher's World</title>
<link rel="stylesheet" href="witcher.style.css"/>
<meta charset="UTF-8">
<header>
<nav id="wrap">
<ul>
<li><a class ="active" href="witcher.index.html">Home</a></li>
<li><a href="#">Witcher Lore</a></li>
<li><a class="dropdown" href="#">Glossary</a></li>
<ul class="dropdown-content">
<li><a href="#">Characters</a></li>
<li><a href="#">Bestiary</a></li>
</ul>
<li><a class="dropdown" href="#">Weapons</a></li>
<ul class="dropdown-content">
<li><a href="#">Swords</a></li>
<!--<ul class="dropdown-content">
<li><a href="#">Steel Swords</a></li>
<li><a href="#">Silver Swords</a></li>
</ul-->
<li><a href="#">Signs</a></li>
</ul>
<li><a href="#">Books</a></li>
</ul>
</nav>
</header>
<body>
<footer>
</footer>
</body>
</html>