Remove space between pictures in collections section

Topic summary

Main Issue:
Users want to remove spacing between images in Shopify collection sections to create a seamless, edge-to-edge gallery layout.

Primary Solutions Provided:

  • CSS code injection via theme.liquid file (before </body> tag)
  • Key CSS properties used:
    • column-gap: 0 !important for collection grids
    • max-width: 100vw and margin: 0 for full-width display
    • Custom width values (e.g., width: 298px) for precise image sizing

Common Challenges:

  • Initial code attempts didn’t always work due to theme-specific CSS selectors
  • Right-side spacing persisted even after applying padding/margin resets
  • Required iterative adjustments to target correct CSS classes (.collection-list-wrapper, .product-grid-container)

Resolution:
Multiple users successfully implemented solutions with customized CSS values. One user adjusted provided code from default to 376px width, achieving desired seamless appearance.

Additional Request:
Thread concludes with request for full-width background video implementation under header (separate from original spacing issue).

Status: Resolved for original posters through custom CSS modifications.

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

Greetings,

I have noticed that the Collection List images on my home page appear to have spacing between them. I was wondering if there is a way to remove that spacing and have images stick to each other as the pic attached below. Would anyone happen to know how to do this?

Thank you.

alignaide.com

from this

to this

Hi @ak74
You must remove padding of images box. Share page url so I can provide exact css code

Hello there,

It is a collections box, you should see it at alignaide.com if you scroll down in the homepage. I have removed the padding from the collection section but the images are named images so this setting to remove padding is not available.

I hope you can help

Thanks

Hello @ak74

You can add code by following these steps to remove spaces between images on collection list homepage

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

@media screen and (min-width: 767px) { .collection-list.grid { column-gap: 0 !important; } }

1 Like

Thank you so much! it worked.

How can I get it to take have the pictures bigger and fit across the screen from left to right?

Hello @ak74
It needs to modify slider code to fit on the screen

@ak74

Use below css to make collection link bigger

@media (min-width:768px) { .collection-list-wrapper.page-width{ margin: 0; width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; padding: 0; max-width: 100%; } }

there is still space on the right side of the page, please refer to the photo below.

Thanks,

Hi @ak74

Please use this alternate solution

.collection-list-wrapper.page-width { margin: 0; padding: 0; max-width: 100vw; } .collection-list-wrapper .grid--4-col-desktop .grid__item.collection-list__item { width: 25%!important; max-width: 25%!important; }

Hi. I want to have a seemless look betweeen my photos, same as this:

https://www.ulefone.com/armor-x13.html

Today it looks like this:

https://qmo6k09ve7qrr1yp-40562163873.shopifypreview.com/collections/armor-x-series/products/copy-of-ulefone-armor-x13

What do I need to do?

Hello im interested in the same but the code you’ve given does not work :disappointed_face:

can you share store URL?

My website URL is:

https://malikaclover.com/collections/frontpage

Password: CloverMal10

In the wearables products page, I have framed images that i would like to be touching side by side

Hey @malikaclover

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

@media screen and (min-width: 750px){ .product-grid-container ul#product-grid { column-gap: unset !important; } }

Thank you for the above, unfortunately it did not work :disappointed_face:

Also im trying to resize the images slightly how would I do that?

That code working, There is no gap between in images.

how you want to resize image?

There is still space between the images, i need the frames touching side by side