Dealing with WordPress can be frustrating at times, especially when trying to style a menu that is auto-generated by the platform.
Here is the basic HTML structure:
<div class="footer">
<!--Generated By Wordpress-->
<ul class="menu">
<li class="menu-item">
<a></a>
<ul class="sub-menu">
<li class="menu-item">
<a></a>
</li>
</ul>
</li>
</ul>
<!--End Generated-->
</div>
I am looking to write CSS code that specifically targets the <a> elements within the sub-menu, without affecting the main menu. Additionally, I need this styling to only apply to the footer menu and not interfere with any other menus on the site.
Is using the following CSS selector the correct approach?
.footer .sub-menu a { }
What would be the most appropriate method to achieve this?