I am working on creating a dropdown navigation using pure CSS. I want the dropdown menu to appear when clicking on the ul. The issue I am facing is that simple ul:focus > ul does not seem to work, even though there is an anchor within it. However, the :hover and :active selectors are functioning perfectly fine.
HTML
<li><a href="#">Menu 1</a>
<ul>
<li><a href="#">Sub Menu 1</a></li>
<li><a href="#">Sub Menu 2</a></li>
<li><a href="#">Sub Menu 3</a></li>
<li><a href="#">Sub Menu 4</a>
</ul>
</li>
CSS
#primary_nav_wrap ul li:hover > ul
{
display:block
}
Check out the code here: https://codepen.io/anon/pen/vgpQWV