Shopify themes, liquid, logos, and UX
How do i make the selected variant button visible? Selecting the variant will make the button invisible, it is confusing to the buyers.
Solved! Go to the solution
This is an accepted solution.
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.product-form__input input[type=radio]:checked+label {
background-color: #000 !important;
color: #fff !important;
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Can you share your store's URL?
offthecourt.store
1. Go to 'Online Store' -> Themes -> Edit Code
2. In the assets folder, locate the file 'section-main-product.css'
3. At the end of the file add this code
/* Product Variant Selected Disappearing Problem */
.product-form__input input[type=radio]:checked+label{
background-color: black;
}
.product-form__input input[type=radio]+label {
border: 1px solid black;
}
Hello @momowt
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.product-form__input--pill input[type=radio]:checked+label {
background-color: rgb(var(--color-foreground)) !important;
color: rgb(var(--color-background)) !important;
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Add this if this code not work then please share your store URL.
Hi, thanks for your suggestion but unfortunately it is not working. The url to my store is offthecourt.store
This is an accepted solution.
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.product-form__input input[type=radio]:checked+label {
background-color: #000 !important;
color: #fff !important;
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Thank you sir! it works!
- Here is the solution for you @momowt
- Please follow these steps:
- Then find the theme.liquid file.
- Then add the following code at the before tag </head> and press 'Save' to save it.
<style>
.product-form__input input[type=radio]:checked+label {
background: black !important;
}
</style>
- Here is the result you will achieve:
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
For give Gift to customers and Upsell in Cart, check out Salepify: Free Gifts with purchase
Post purchase upsell, downsell offers to improve sales and AOV
Salemate Post Purchase Upsell
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024