Having issues with a CSS drop-down menu not showing sub-menu on hover? Let's dig into the real problem at hand. Check out the HTML and CSS snippets below or visit this JSFiddle link.
It seems like the display: block;
property is not taking effect as expected.
body {
background-color: #eee;
padding: 0;
}
.inline-menu,
.inline-menu ul {
list-style: none;
padding: 0;
margin: 0;
}
.inline-menu > li {
display: inline-block;
padding-right: 25px;
}
.inline-menu a {
text-decoration: none;
}
.inline-menu > li > ul {
display: none;
}
.inline-menu > li > ul:hover {
display: block;
}
<nav>
<span class="logo"></span>
<ul class="inline-menu left-menu">
<li><a href="">L-A</a>
<ul>
<li><a href="">1</a>
</li>
<li><a href="">2</a>
</li>
</ul>
</li>
<li><a href="">L-B</a>
<ul>
<li><a href="">1</a>
</li>
<li><a href="">2</a>
</li>
</ul>
</li>
</ul>
</nav>