How do I remove the space between product images on homepage featured collection,

Topic summary

Goal: remove the spacing between product thumbnails in the homepage featured collection (just below the slider).

What’s been tried:

  • CSS in base.css to remove top margin on the featured-collection section: section#shopify-section-template–14262084501562__featured-collection { margin-top: 0 !important; }. Reported no visible change.
  • Generic CSS to remove vertical spacing between theme sections: .section+.section { margin-top: 0 !important; }. Also had no effect.
  • theme.liquid injection (initial snippet was effectively empty). When attempted, it introduced extra white space between the header and slider instead of fixing product image gaps.

Latest suggestion:

  • Target the slider list and control spacing via gap: #shopify-section-template–14660639588410__ a0cf5780-3951-412d-82de-cfa3e7eb3bba slider-component > ul { gap: 15px !important; }. The gap property controls space between items in a flex/grid/list; adjusting it (e.g., to 0) could remove gaps. A screenshot was shared to clarify the target area.

Other notes:

  • OP warned about a suspicious “expert” asking for store access; advised caution.

Status: unresolved/ongoing. OP is seeking a working CSS fix to eliminate the product image spacing.

Summarized with AI on January 14. AI used: gpt-5.

Here’s my website https://www.headofthebaptist.com/

i would like to remove the space between the product images on the collection featured right underneath the slider image on my homepage,

any help is much appreciated.

1 Like

Hi @BarbsNwires

Do you mean this one?

If it is 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:
section#shopify-section-template--14262084501562__featured-collection {
    margin-top: 0px !important;
}
  • And Save.

Hi @BarbsNwires ,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file → Save


Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Hey, thank you so much for replying to me.

I did locate the base.css file (i have no exact name files style.css and theme.css, only the base one was a css) i did copy and paste. then saved but no changes unfortunately.

Hey, thank you for the tip. Will reach out, if all else fails!

Hey Oliver,

Thank you so much for the help, I did try but unfortunately it just added a white space between the header and the my slider image.

Any other suggestions will be much appreciated! many thanks x

Try this one.

Same Instruction.

.section+.section {
    margin-top: 0px !important; 
}

Save and Refresh.

Thanks!

Hey!

Thank you for the msg, unfortunately that didn’t work either though.

A little heads up for anyone posting in these threads, as I was contacted by a so called Shopify expert, saying he can help and all he needs was access to my store. I noticed he joined as a customer same time I made this post, so when i asked him for his profile link as a shopify expert, he said he had to run and never got back to me. So yeah be careful everyone!

Hi @BarbsNwires ,

You can try

#shopify-section-template--14660639588410__a0cf5780-3951-412d-82de-cfa3e7eb3bba slider-component > ul{
gap:15px !important
}