LeyDE
October 13, 2023, 12:01am
1
Hello Dear community,
Its my third time asking but no one was able to make it work on mobile view. Im using the focal theme and I want to change the color and background color of the “on sale” accent on both desktop AND mobile view.
What exactly do I need to change in the code?
URL: https://leyah.de/products/5-in-1-haarstyler
Thanks.
Hi @LeyDE
This is Henry from PageFly - Landing Page Builder App
You can try this code by following these steps:
Step 1: Go to Online Store->Theme->Edit code.
Step 2: Search file theme.css
Step 3: Paste the below code at bottom of the file → Save
.product-meta__price-list-container span.label.label–highlight {
background: black !important;
color: red !important;
}
Hope that my solution works for you.
Best regards,
Henry | PageFly
LeyDE
October 13, 2023, 12:27am
3
Thanks for the fast reply Henry.
This did not work. It only shows on desktop view but I want it mainly on mobile view.
1 Like
You can try again with this code only on mobile:
@media (max-width: 767px){
.product-meta__price-list-container span.label.label–highlight {
background: black !important;
color: red !important;
}
}
Hello @LeyDE
Inside Shopify Admin, you can go to Edit theme code, open file theme.css and add this code at the bottom
.label--highlight {
color: #000 !important;
background: #00ff00 !important;
}
The result on mobile
Hope that help!
LeyDE
October 13, 2023, 1:16am
7
Unfortunately, this didn’t work for mobile view. It only changed the desktop view.
Are you testing on a physical mobile device or inside your browser’s developer tools? The old version of the sale tag might be cached. Try clearing the cache and test on another mobile device and browser.
LeyDE
October 13, 2023, 1:43am
9
I deleted cache and tried another browser. No results.
Okay, in that case I’d have to take a look at your theme code
Please try another solution:
Step 1: Go to Online Store->Theme->Edit code.
Step 2: Search file theme.liquid
Step 3: paste bellow code in tag → save.
@media (max-width: 767px){
.product-meta__price-list-container span.label.label--highlight {
background: black !important;
color: red !important;
}
}