How to eliminate margins from a collection page?

Topic summary

A user seeks to make their collection page product grid full-width by eliminating side margins on both desktop and mobile versions. They’re using the Stiletto theme and provided reference images showing desired layout changes.

Solution Provided:

  • Add custom CSS code to the theme.liquid file within the <head> tag
  • The code targets .container elements with max-width: 100% !important; and removes padding

Outcome:

  • Initial solution successfully removed side margins
  • User returned with a follow-up question about eliminating gaps between individual products in the grid
  • This secondary issue remains unresolved and awaits further guidance
Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

Hello!

I would like to make the products fill the entire screen on the collection page and have no margins on the sides, basically making the product grid full width (both in the desktop and mobile versions).

My theme is Stiletto, my website is https://winnerofficial.com/collections/ss-2024 and my password is y21.

I have tried different codes and nothing works!

I am attaching reference photos (the red rectangles are the areas where the images should extend):

Desktop:

Mobile:

You can try this code by following these steps:
Step 1: Go to the online store ->Theme ->Edit Code.
Step 2: Find the theme. liquid file and add the following code to the head tag


Hopefully it will help you. If yes then Please don’t forget hit Like and Mark it as solution!

2 Likes

It worked! Thank you!

Thank you for your reply. I’m glad to hear that the solution worked well for you.
If you require any more help, please don’t hesitate to reach out.

1 Like

Is there any solution to remove the gap between the products?