Remove extra spacing between different containers / sections,

Topic summary

A user is experiencing unwanted spacing between containers/sections on their Shopify store (Theme: Glozin version 1.8.1) and has been unable to remove it despite trying various options. An image shows the problematic spacing.

Multiple solutions proposed:

  • Custom CSS in theme.liquid: Add CSS code above the </body> tag to target section spacing
  • Theme settings approach: Navigate to Customize > Theme Settings > Custom CSS and add .index-section { margin: 0px 0; } with adjustable pixel values
  • Built-in theme controls: Check Theme Settings > Layout for a section padding reduction option
  • Targeted CSS fix: Add code to theme.css file: #MainContent section:not(:last-child) .section:not(.remove_spacing) { margin-bottom: 0px !important; }

One responder provided a before/after screenshot showing successful spacing removal. The discussion remains open with no confirmation from the original poster about which solution worked.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

Hi Community,

I am puzzled to remove extra spacing between containers / sections, I had tried every option but unable to remove it. Can you help me in this regards?

URL: https://qcam90oia206z7jv-61554688170.shopifypreview.com/

Theme: Glozin version 1.8.1

2 Likes

Hey @usmekhan91

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to solve your problem then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

1 Like

Hey @usmekhan91 You should try out the following steps and you’d be able to reduce the extra space between the sections

  1. Log in to your Shopify admin panel.

  2. Click on Online Store and then Themes.

  3. On the right-hand side, click Customize for the theme you want to edit.

  4. In the left-hand side navigation, click Theme settings.

  5. Scroll down to the Custom CSS section.

  6. Paste the CSS code below in the box.

.index-section {
  margin: 0px 0;
}
  1. You can adjust the px value above, then click Save.

Feel free to update me on this if it works for you.

Hi @usmekhan91

You try to find and remove it from your store admin > Sales channels > Online Store > Themes > Customize > Theme settings > Layout, check and reduce section padding option

Hello @usmekhan91
Go to online store ----> themes ----> actions ----> edit code ----> theme.css
add this code at the end of the file and save.

#MainContent section:not(:last-child) .section:not(.remove_spacing) {
margin-bottom: 0px !important;
}

result

Thanks