Shopify themes, liquid, logos, and UX
Hello,
How do I change the variant "type value" and variant "size value" in "background black color" and the "text white color" when selected?
Your help is appreciated.
Store: www.visualwallart.com
Solved! Go to the solution
This is an accepted solution.
You can try this code by following these steps:
Step 1: Go to the online store ->Theme ->Edit Code.
Step 2: Find the theme.liquid file and add the following code before the </head> tag
<style>
fieldset input[type=radio]:checked+label {
background-color: #000 !important;
color: #fff !important;
}
</style>
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Hello @vwa-decor ,
Please share the store URl.
Regards
Guleria
Follow these steps:
1. Go to Online Store -> Theme -> Edit code
2. Open your theme.css file and paste the following code at the bottom:
.single-option-radio input[type=radio]:checked+label {
background-color: #000;
color: #fff;
}
Problem solved don't forget to Like it and Mark it as Solution!
If you need help with customization/code part you can contact me for services
You can find the email in the signature below.
Regards
Guleria
Hello,
Thank for replying.
I did put the code at the bottom of theme.css, but it did not work.
I don't find the code I provided in theme.css
https://visualwallart.com/cdn/shop/t/7/assets/theme.css
Can you please confirm how you added it ?
Please double check I put ir back.
I removed it when it did not work.
Yes now css is there and you are right it's not working.
Can you please once try to add it in theme.liquid just before </head> tag
like this
<style>
.single-option-radio input[type=radio]:checked+label {
background-color: #000 !important;
color: #fff !important;
}
</style>
You are the 'Man' ... It works fine.
Thanks
It works,
Thankyou very much
Great but you mark another topic as solution.
That was a mistake.
This is your code that worked for both variants:
<style>
.single-option-radio input[type=radio]:checked+label {
background-color: #000 !important;
color: #fff !important;
}
</style>
You can check it out
Hi, @vwa-decor
Can you please share the store URL so that I can assist you?
This is an accepted solution.
You can try this code by following these steps:
Step 1: Go to the online store ->Theme ->Edit Code.
Step 2: Find the theme.liquid file and add the following code before the </head> tag
<style>
fieldset input[type=radio]:checked+label {
background-color: #000 !important;
color: #fff !important;
}
</style>
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Thank you for replying,
I just added it, but not working
I can help you with it directly. I need to check your code. So I need to access your store as a collaborator if possible. Can you please send me your collaborator code?
Actually it only work for the variant type value not the variant size value.
I tried the following and it works for both variants:
<style>
.single-option-radio input[type=radio]:checked+label {
background-color: #000 !important;
color: #fff !important;
}
</style>
Okay Great. I updated the code.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024