How to minimize space between 2 sections

Topic summary

A user seeks help reducing excessive spacing between two sections on a Shopify product page, providing a screenshot and store URL with password for reference.

Solutions Provided:

Two community members offer CSS-based fixes:

  • First solution: Add CSS code to section-main-product.css targeting .product__info-container .icon-with-text with margin: 0rem;
  • Second solution: Add CSS to base.css targeting the same element with margin-top: 1rem;

Both approaches involve editing theme code files through the Shopify admin panel (Online Store > Themes > Actions > Edit code).

Outcome:

The issue is resolved. The user confirms one of the solutions successfully minimized the spacing between the sections.

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

Hello guys, how can I minimize the space between these 2 sections?

Hello there, sure here is the url and password:

https://www.nistore.de/products/3-in-1-dog-hair-brush-cat-hair-brush-electric-pet-cleaning-brush-steam-spray-brush-massage-hair-removal-comb-anti-flying-brush

nikthe

Hello @NikosBat
Go to online store ----> themes ----> actions ----> edit code ----> assets ----> section-main-product.css
add this code at the end of the file and save.

.product__info-container .icon-with-text {
margin: 0rem;
}

result

If this was helpful, hit the like button and accept the solution.
Thanks

1 Like

Hello @NikosBat

Please follow the steps below after logging into the Shopify admin:

  • Go to your Shopify Admin panel.

  • Click on Online Store > Themes.

  • Find the live theme and then click Actions > Edit code.

  • Search base.css

  • Insert the provided CSS code at the end of the file and save the changes.

.product .product__info-wrapper .product__info-container .icon-with-text
{
    margin-top: 1rem;
}

Please hit Like and Mark it as a Solution if you find our reply helpful.

1 Like

Hi there, that has solved my problem thank you very much!