Here is my css code that makes a dropdown menu visible:
a.menu:hover {
opacity: 1;
text-shadow: 0 0 10px white;
}
a.menu:hover ~ .dropdown {
display: block;
}
.dropdown {
display: none;
width: 50px;
height: 50px;
position: absolute;
top: 120px;
left: 120px;
background: red;
}
This is the corresponding HTML:
<p class="left_topbar">
<a href="http://teamcowgames.net" class="logo"><img src="css/img/logo.png"></a>
<a href="http://teamcowgames.net/games" class="menu">Games ▾</a>
</p>
<div class="dropdown"></div>
I'm trying to figure out why the .dropdown element becomes visible when hovering over the menu link. Any ideas?