Shopify themes, liquid, logos, and UX
Hey guys i would to like to add a thin border around my collection/product list images and in the filter section above it. Attached is an image on what i want to achieve . Any help will be greatly appreciated thank you!
link: https://haltware.com/collections/all
Hi, You can add borders like this by using this simple code just follow below steps.
1 - Open your shopify store dashboard then click on "Online Store" from left sidebar.
2- On the right side you see published theme and there will be "three dots" click on them and click on "Duplicate" and wait untill you have backup of live theme.
3- Then again click on "three dots" on these three dots and click on "Edit Code" then editor will open.
4- Inside code editor there is search bar. You have to write "component-product-card" it will be available click on this file to open the code.
5- At the very bottom of this you have to copy and paste below code and save file that is it.
.sf__pcard .sf__pcard-image .spc__main-img{
border:1px solid #000;
}
Note: If you are unable to make changes then I will recommend you to hire an expert.
just tried that and it only shows the border around the image and not the whole section
It can be done but it is a little bit complicated. I would suggest you hire an expert to get it done faster.
@krnknyc,
1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:
<style>
@media (min-width: 750px){
.sf__collection-toolbar{
position: relative;
}
.sf__collection-toolbar:before{
content: "";
position: absolute;
left: -10vw;
right: 10vw;
width: 150vw;
height: 1px;
background: black;
top: -11px;
}
.sf__collection-toolbar:after{
content: "";
position: absolute;
left: -10vw;
right: 10vw;
width: 150vw;
height: 1px;
background: black;
bottom: -10px;
}
.sf__col-item{
border-top-color: transparent !important;
}
.sf__col-item:first-child{
border-left-color: transparent !important;
}
.sf__product-listing > *:nth-child(1){
margin-top: 10px !important;
}
.sf__pcard-image {
padding-top: 10px;
}
}
</style>
<script>
</script>
Further customizations would be more complex and indeed require hiring a dev, but this is a start.
If it helps you please click on the "like" button and mark this answer as a solution!
Thank you.
Kind regards,
Diego
hey thanks diego! i just tried it but it only shows on the filter section and not on the products
I would like the same thing, did you find any solution?
Hey 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, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024