HTML:
<ul class="nav">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="#">A</a>
<ul>
<li><a href="x.php">X</a></li>
<li><a href="y.php">Y</a></li>
<li><a href="z.php">Z</a>
</ul>
</li>
</ul>
</ul>
CSS:
.nav ul ul {
position:absolute;
visibility: hidden;
opacity:0;
width:170px;
margin:0;
transition:visibility 0s linear 0.3s, opacity 0.3s linear;
-webkit-transition:visibility 0s linear 0.3s, opacity 0.3s linear;
-moz-transition:visibility 0s linear 0.3s, opacity 0.3s linear;
}
.nav ul li:hover > ul {
visibility: visible;
opacity:1;
}
I'm facing an issue where the first level doesn't seem to fade in on hover of a list item from the main menu. I've tried multiple approaches and spent hours trying to fix it, but with no luck so far. If you have any suggestions or pointers on what might be wrong, please let me know.
If you want to view the entire code for reference, click here: