How can I change the color of submenu items in a sale category?

Hi.

I found the code to change a menu item red for our main SALE category when it goes live.

.site-nav a[href=“/collections/sale”]
{ color: red; }

However, how would we edit this to make the relevant sub sale categories also red.

https://generousape.com/

If you go into the womens category and look at the dropdowns, we want ‘womens clothing sale’ ‘womens accessories sale’ ‘womens shoe sale’ to appear in red, and the same for the mens sales too.

Thank you!

And also the code for the mobile site too please.

This can only be done through custom coding because through normal CSS code, it is hard to achieve functionality.

The best approach that I believe is to add the condition through JavaScript. You can hire a Shopify expert to do this for you and if you want me to do this, just leave me a leave and I will do it for you :slightly_smiling_face:

1 Like