I'm attempting to create a dropdown menu that reveals itself when I hover over the text, but it doesn't seem to be functioning as intended:
This code successfully displays the submenus when hovered over:
nav ul li:hover ul{
display: block; visibility: visible;
}
However, this code is not displaying the submenus upon hovering:
nav ul li a:hover ul{
display: block; visibility: visible;
}
Any suggestions on how to get the second code snippet to work properly?