Change The Colour Of A Single Main Menu Item

Change The Colour Of A Single Main Menu Item

WinnieLim
Visitor
2 0 1

Hello to all the Shopify community :-),


I need help for CSS coding on Lammer Theme 2023 -> I would like to change the text color of only one of my main navigation menu to highlight it.

The "SALE" navigation menu should appear In Red rather than grey.
I tried to quibble with the code but nothing to do, the color does not change. I'm having trouble identifying my menu or placing my code incorrectly on my CSS stylesheet.

Website - https://mypuras.com/

Thank You!

Replies 5 (5)

Asad-Mahmood
Shopify Partner
445 80 91

Use this css

a[href="/collections/last-chance"] {
  color: red !important;
}
If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver




tim
Shopify Partner
4483 532 1634

The best way in my opinion is to target by the URL these links point to:

         nav [href="/collections/last-chance"],
.drawer__nav [href="/collections/last-chance"] {
  color: red;
}

This code you should put into "Custom CSS" setting under "Theme settings" in "Customize"

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

ZestardTech
Shopify Partner
6144 1097 1474

Hello @WinnieLim ,

Here are the steps to apply the necessary changes in your Shopify store:

  1. In your Shopify Admin, navigate to Online Store > Themes > Actions > Edit Code.
  2. Locate Asset > base.css and paste the following code at the bottom of the file:
ul.site-nav > li:first-child > a {
    color: red !important;
}

ZestardTech_0-1745487971104.png

 


Let me know if you need further assistance!

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing

sgtlab
Shopify Partner
61 3 2

Hi

 

You can try this snippet.

 
<style>
li.site-nav__item:first-child a.site-nav__link { color: red; }
li.site-nav__item:first-child a.site-nav__link:hover{ color: red; }
li.site-nav__item:first-child a.site-nav__link .site-nav__title::before { border-bottom: 2px solid red;}
</style>

 

Here's how it will look

Screen Shot 2025-04-24 at 16.56.26.png

You can see a live preview and learn how to import this snippet into your store here:

https://shop-booster.sgt-lab.com/snippet/mypurascom?snippetId=1745488507475

 

Hope this helps!

- Need more help? Join us
- Helpful? Like & Accept the solution
WinnieLim
Visitor
2 0 1

Thank you, your method works for me and showed me where to insert the code successfully.