How do I remove the left margin from the first product in a collection on Shopify?
Thanks
Topic summary
A Shopify store owner seeks to remove the left margin from the first product in a collection display.
Solution Provided:
- Navigate to Shopify admin → Online Store → Themes → Actions → Edit code
- Locate the CSS file (base.css, style.css, or theme.css) in the Assets folder
- Add the following CSS code at the bottom:
@media screen and (min-width: 990px) {
.slider--desktop .slider__slide:first-child {
margin-left: 36px !important;
}
}
Outcome:
The solution was successfully implemented and confirmed working by the original poster. The CSS targets the first slide element on desktop viewports (990px and wider) and applies a specific left margin adjustment.
Hi @lisbotech
Would you mind to share your Store URL website? with password if its unpublish. Thanks!
1 Like
Thanks for the info, try this one.
- From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
- Find the theme that you want to edit and click on “Actions” and then “Edit code”.
- In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
@media screen and (min-width: 990px){
.slider--desktop .slider__slide:first-child {
margin-left: 36px !important;
}
}
- And Save.
- Result:
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
1 Like
It worked, tysm
1 Like

