Shopify themes, liquid, logos, and UX
I would like to change our 'SALE' button on our menu to the colour red, I have tried multiple types of code found in other answers for the same question but I think it may change from theme to theme.
I'm using the Momentum theme, and it doesn't seem to have to correct .css files under assets when I go to edit the code. The website is statementnz.com , if that is any help.
Any suggestions would be appreciated!
Solved! Go to the solution
This is an accepted solution.
There are 2 ways to do this:
First Way
1. Go to Online Store->Themes->Edit Code
2. Locate the file 'theme.min.css'
3. At the end of the file paste the below code
.first-level-dropdown:nth-child(5) a span {
color: red;
}
This will work, but it's not very efficient because if you want to change its position, you'll always have to update the number inside the parentheses.
Second Way
The second way to achieve this is by finding the Liquid code for the menu and adding a separate class name to the 'SALE' menu item. This way, you can target it easily without using the `nth-child()` property.
This is an accepted solution.
Yea of course. Add the below code at the end of the 'theme.min.css' file.
.mobile-nav__item.top-level:nth-child(5) a {
color: red !important;
}
This is an accepted solution.
There are 2 ways to do this:
First Way
1. Go to Online Store->Themes->Edit Code
2. Locate the file 'theme.min.css'
3. At the end of the file paste the below code
.first-level-dropdown:nth-child(5) a span {
color: red;
}
This will work, but it's not very efficient because if you want to change its position, you'll always have to update the number inside the parentheses.
Second Way
The second way to achieve this is by finding the Liquid code for the menu and adding a separate class name to the 'SALE' menu item. This way, you can target it easily without using the `nth-child()` property.
This is wonderful, the first way works for desktop perfectly. Is there a way to make it work for mobile as well?
This is an accepted solution.
Yea of course. Add the below code at the end of the 'theme.min.css' file.
.mobile-nav__item.top-level:nth-child(5) a {
color: red !important;
}
Also if you want to add the hover effect in desktop add the below code again at the end of the 'theme.min.css' file
.first-level-dropdown:nth-child(5) a:hover span{
color: #ff5c5c; /* Modify the color according to your preference */
}
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024