We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How can I change a single element in the main menu to have a different color (using a theme)

Solved

How can I change a single element in the main menu to have a different color (using a theme)

VIDAS
Visitor
2 0 1

How can I change a single element in the main menu to have a different color (using a theme template)? 

We want to change just a single line of text in the drop down menu to have a different color compared to the rest. The rest are white, we want "ПРОТЕИНОВИ" to be in pink.

Could you give me a script to do that? Thanks in advance!

The website URL: https://vidas.bg/

Screenshot 2024-04-25 at 13.11.05.png

Screenshot 2024-04-25 at 13.10.14.png

Accepted Solution (1)

JasmeetVT14313
Shopify Partner
292 63 77

This is an accepted solution.

Hi @VIDAS 
Try adding below code to end of theme.css file

 

@media only screen and (min-width: 1024px) {
.submenu.submenu--items-3 li.submenu-item:nth-child(2) ul li.submenu-item:nth-child(5) a {
    color: #ea3a86;
}
}

 


If this information was helpful to you, please give it a Like. If it resolved your issue, kindly hit Like and mark it as the Solution! Thank you!


- VTN Customer Dashboard enhances your customer's dashboard with advanced features, profile management, and order tracking. Free trial available.
- Feel free to contact me at jasmeet.kaur@vtnetzwelt.com

View solution in original post

Replies 3 (3)

JasmeetVT14313
Shopify Partner
292 63 77

This is an accepted solution.

Hi @VIDAS 
Try adding below code to end of theme.css file

 

@media only screen and (min-width: 1024px) {
.submenu.submenu--items-3 li.submenu-item:nth-child(2) ul li.submenu-item:nth-child(5) a {
    color: #ea3a86;
}
}

 


If this information was helpful to you, please give it a Like. If it resolved your issue, kindly hit Like and mark it as the Solution! Thank you!


- VTN Customer Dashboard enhances your customer's dashboard with advanced features, profile management, and order tracking. Free trial available.
- Feel free to contact me at jasmeet.kaur@vtnetzwelt.com
VIDAS
Visitor
2 0 1

Thanks a ton! 

 

Vinsinfo
Shopify Partner
491 167 172

@VIDAS Please follow below steps to change single element menu color. Let me know whether it is helpful for you.

 
1. From admin go to "Online stores" -> "Themes"
2. Click action button from the current theme and select "Edit code".
3. Search for "theme.css" file and paste the below code at the bottom of the file.

 

a.submenu-item__link[href^="/pages/protein-drinks"] {
    color: #ea3a86 !important;
}

 

 
Result will be like,
Vinsinfo_0-1714045653317.png

 

Please provide your support by click "Like" and "Accepted" if our solution works for you. Thanks for your support.
Please reach out to bizdev@vinsinfo.com for any enquires related to Shopify.
Our Services: Custom Theme Development, Theme Customization, Custom Feature Implementation, Data Migration, Custom APP Development, Website Optimization and Google Merchant Center Support