Reduce gap between bar filter and collection image?

Topic summary

A user seeks to reduce the vertical spacing between the filter bar and collection banner image on their Shopify store’s collection page.

Initial Problem:

  • Gap between filter bar and collection header image is too large on both desktop and mobile views
  • Multiple screenshots provided showing the spacing issue

Solution Provided:
MandasaTech offered CSS code to be added to the theme.liquid file before the closing </body> tag:

  • Desktop: Reduces .collection-hero margin-bottom to 15px
  • Mobile: Sets .collection-hero margin-bottom to 5px and .filters-toolbar-wrapper margin-bottom to 0px
  • Uses media queries for responsive adjustments

Current Status:

  • Desktop spacing successfully reduced
  • Mobile spacing also addressed
  • User now requesting additional refinement: reduce gap between filter bar titles and center product positioning in mobile view
  • Discussion remains ongoing with further customization requests
Summarized with AI on November 24. AI used: claude-sonnet-4-5-20250929.

Hi guys,

I would like to reduce the gap between the bar filter and collection image.

Thank you

allianceautoproducts.com

@Alliance
Put below css into theme.liquid file before closing tag


I meant the collection image header

i reduce gap between filter bar and collection images .

Nope. Want to reduce the gap between filter bar and collection image.

Hello @Alliance

It’s GemPages support team and glad to support you today.

I would like to give you a solution to support you.

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

  2. Open your theme.liquid theme file.

  3. Paste the below code before :

  • Reduce Gap: Collection banner with Bar Filter Collection

  • Reduce Gap: Bar Filter Collection and Product list

Hope my solution can work and support you!

Kind & Best regards!

GemPages Support Team.

Hello @Alliance

I would like to give you a solution to support you:

  1. Go to Online Store-> Theme-> Edit code
  2. Open your theme.liquid theme file
  3. Paste the below code before :
<style>
@media only screen and (min-width: 750px){
.collection-hero {
margin-bottom: 23px !important;
}
}
</style>

Was my reply helpful? Please Like and Accept Solution. This mean alot to me

Hi,

Didn’t work.

@Alliance

I would like to give you a solution to support you:

  1. Go to Online Store-> Theme-> Edit code
  2. Open your theme.liquid theme file
  3. Paste the below code before :
<style>
@media only screen and (min-width: 750px){
.collection-hero {
margin-bottom: 15px !important;
}
}
</style>

Was my reply helpful? Please Like and Accept Solution. This mean alot to me

Worked excellent on desktop view, but on mobile view, no change. Also, if you can reduce the gap between the filter bar titles. Thank you

@Alliance

I would like to give you a solution to support you:

  1. Go to Online Store-> Theme-> Edit code
  2. Open your theme.liquid theme file
  3. Paste the below code before :
<style>
@media only screen and (min-width: 750px){
.collection-hero {
margin-bottom: 15px !important;
}
}
@media(min-width: 280px) and (max-width: 767px){
.collection-hero {
margin-bottom: 5px !important;
}
.filters-toolbar-wrapper {
margin-bottom: 0px !important;
}
}
</style>

Was my reply helpful? Please Like and Accept Solution. This mean alot to me

@Alliance

Was my reply helpful? Please Like and Accept Solution. This mean alot to me

Excellent job. Can you reduce the gap between the filter bar titles and put products in the middle in Mobile View. Thank you