On mobile the featured collection images have a white border around the product image. How can I remove these?
Topic summary
A user encountered white borders around featured collection product images on mobile devices and sought a solution to remove them.
Solutions Provided:
Multiple community members offered CSS-based fixes with slight variations:
- Method 1: Add custom CSS to
theme.liquidfile below the<head>tag targeting.card__innerelements - Method 2: Insert CSS before the
</body>tag intheme.liquidwith border removal code - Method 3 (Successful): Add CSS to
base.cssfile (Asset folder) with the code:
.card--standard .card__inner {
border-color: transparent !important;
}
Resolution:
The issue was resolved using the base.css approach. The original poster had initially attempted adding code to theme.liquid instead of the CSS file, which explained why their first attempt failed. Screenshots were provided by helpers showing exact file locations and code placement within the Shopify theme editor.
Hey @nmn22601 ,
Go to your theme’s “Edit Code” Option, then in the search bar type “theme.liquid”
Below the tag “” tag paste the following. Screenshot attached for reference.
Screenshot is for reference only, the correct code to paste is the one shown above.
Hello @nmn22601 ,
I understand you are looking to remove the featured product image border.
You can remove the border with the help of following steps -:
-
Go to Online Store → Themes-> Edit Code https://prnt.sc/AD-DQ6ECUvcp
-
Open the theme.liquid file and paste the code at the bottom of the file before tag
Output will be like this =>
I hope the solution helps you.
Please share if you have any query.
Thank you.
@nmn22601 , do this to fix it in 20 seconds:
- In your Shopify Admin go to: online store > themes > actions > edit code
- Find Asset > base.css and paste this at the bottom of the file:
.card--standard .card__inner {
border-color: transparent !important;
}
If it helps you please click on the “like” button and mark this answer as a solution!
Thank you.
Kind regards,
Diego
Thank you that worked. I was adding that code to the base.css. How did you know to use the theme.liquid?


