All things Shopify and commerce
Hi community, is there a way I can add a thin boarder round the edge of my white colour swatch only, currently it's struggling to show up against the background.
URL – https://pantee.co.uk/?_ab=0&_fd=0&_sc=1&preview_theme_id=144118972631
Colour swatch white: #fafafa
Current white swatch (last colour) –
What I need (think light grey border around the white swatch only) –
Solved! Go to the solution
This is an accepted solution.
Check this one.
From you Admin page, go to Online Store > Themes
Select the theme you want to edit
Under the Asset folder, open the main.css(base.css, style.css or theme.css)
Then place the code below at the very bottom of the file.
.swatch-method-swatches.swatch-style-icon_circle label[data-swatch="white"]::before {
border: 1px solid grey;
}
And Save.
Result:
And if you like all the color:
.swatch-method-swatches.swatch-style-icon_circle .opt-label--swatch::before {
border: 1px solid grey;
}
And save.
Result:
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Here is the solution for you @emilyaugstudios
- 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>
label.opt-label.opt-label--swatch.btn.relative.text-center {
border: 1px solid #fafafa !important;
}
</style>
- Here is the result you will achieve:
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
Hi @BSS-TekLabs thank you for the help. Unfortunately that code doesn't work, it adds a border round all of my colour swatches, plus the swatch and border has padding whereas I want the border to be directly around the swatch with no white space in between. Thank you anyway 🙂
What that code does –
@emilyaugstudios, try this one
<style>
label.opt-label.opt-label--swatch:before{
border: 2px solid #fafafa !important;
}
</style>
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
This is an accepted solution.
Check this one.
From you Admin page, go to Online Store > Themes
Select the theme you want to edit
Under the Asset folder, open the main.css(base.css, style.css or theme.css)
Then place the code below at the very bottom of the file.
.swatch-method-swatches.swatch-style-icon_circle label[data-swatch="white"]::before {
border: 1px solid grey;
}
And Save.
Result:
And if you like all the color:
.swatch-method-swatches.swatch-style-icon_circle .opt-label--swatch::before {
border: 1px solid grey;
}
And save.
Result:
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
HEllo @emilyaugstudios
Go to online store ----> themes ----> actions ----> edit code ----> assets ---->main.css
add this code at the end of the file.
.swatch-style-icon_circle .option-selector .opt-label--swatch::before, {
border: 0.1px solid black;
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
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