How do I remove the left margin from the first product in a collection on Shopify?

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.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

How do I remove the left margin from the first product in a collection on Shopify?
Thanks

Hi @lisbotech

Would you mind to share your Store URL website? with password if its unpublish. Thanks!

Página Inicial LISBOTECH

lisbotech.com

password: yangan

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;
}
}

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

It worked, tysm

1 Like