Rich Text - How to reduce spacing between title and text?

Topic summary

A user seeks to reduce the vertical spacing between a title (“Our Bestsellers”) and the following text in the Rich Text section of their Shopify Dawn theme.

Solutions Provided:

Two community members offered CSS-based fixes:

  • Option 1: Add custom CSS to the base.css file targeting .rich-text__blocks with margin-top: 0px !important;
  • Option 2: Insert markup code before the </body> tag in the theme’s liquid file

Outcome:

The issue was resolved—the user confirmed that one of the proposed solutions successfully reduced the spacing as desired.

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

Hello,

how do I reduce the spacing between the title and text, on Rich Text ?

I want to reduce the spacing between “Our Bestsellers” and the following text, just by a little bit, for it to look much neater and not too far apart. How would I be able to do that ?

This is my current theme (Dawn): https://justincase-de.com/

Kind regards

This is how the rich text looks currently:

And this is what i would like it ti be (https://merch-amsterdam.com/ :disappointed_face:

@JustInCase-de
Put below css into base.css file (Online store->themes->Edit code->assets->base.css)

.rich-text__blocks>*+* {
    margin-top: 0px !important;
}

Hello @JustInCase-de

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 :


Hope my solution can work and support you!

Kind & Best regards!

GemPages Support Team.

That worked, thank you!