Re: How do I change the color of the ,,sale,, to red on navigation?

How do I change the color of the ,,sale,, to red on navigation?

Jana_Juriková
Tourist
5 0 1

Hello,

 

Can anyone please tell me how to change the color of sale in css to red in css?

 

My shop is www.thegclothing.com

 

Thanks

Best

Matej

Replies 6 (6)

oscprofessional
Shopify Partner
16115 2409 3123

Hello @Jana_Juriková,

1. Go to Online Store->Theme->Edit code
2. Asset->theme.scss.liquid->paste bellow code in bottom of file

#SiteNav li:nth-child(5) a {
	color: red;
}
Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: [email protected] | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free
Jana_Juriková
Tourist
5 0 1

Thanks you, works perfect!

Bo
Shopify Staff (Retired)
1793 197 467

Hey there, @Jana_Juriková 

 

Bo here from Shopify Support! 

 

As I do not know which theme this is I would not be the best equipped to advise you on editing the code, however, there is a hack that works with a lot of themes built for Shopify that does not require editing the theme of the code itself. Instead, we are going to add some formatting to the item name, in this case, sale, right in the navigation settings. 

 

  1. Go to Online Store > Navigation > the menu you want to edit. This will most likely be your main menu.
  2. Click "Edit" beside "SALE".
  3. Change the name of this item from "SALE" to "<span style="color: red">SALE</style>".
  4. Click Save. 

Let me know how this goes and if there is anything else I can assist you with, I'm happy to help!

 

All the Best,

Bo

To learn more visit the Shopify Help Center or the Community Blog.

Anna_Wang1
Excursionist
72 1 4

Hi, this doesn't for me. If I copy this to the name of SALE, the "<span style="color: red">SALE</style>" will show on navigation.

Garotas
Tourist
5 1 1

It works on the desktop version, but on the mobile version it doesn't work...

Garotas
Tourist
5 1 1

It' works for me: <span style='color: red'>SALE</span>