How to change font size and background for rich text banner

Topic summary

A user seeks help changing the font size and background color of a rich text banner on their Shopify store.

Problem:

  • Unable to modify banner styling using custom CSS
  • Wants to adjust both font size and background color

Solution Provided:
A developer (@KabirDev) shared custom CSS code targeting the specific Shopify section ID:

  • Sets white text color (#fff)
  • Sets black background (#000)
  • Uses !important flags to override existing styles

Implementation:

  • Code should be added to base.css, theme.css, or style.css file
  • Place at the very end of the CSS file
  • Initial attempt resulted in CSS validation errors, likely due to copying issues

Outcome:
The issue was resolved successfully after proper code implementation. The user confirmed the solution worked.

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

Good day all, would like to seek your expert advice. I was trying to figure it out myself using custom css and what not but to no avail.

How can I change the font size and back ground of the rich text banner below. Thanks in advance!

Hi, @tuckermax .

Kindly share your store URL and password.

Hi Websensepro,

https://ef6a29.myshopify.com

No password required

Hi, @tuckermax .

You want to like these. and tel me you want the background color and image.

Hi @tuckermax add the below code to your theme’s CSS file.

#shopify-section-template--21686532997438__654c9d1a-9663-4a22-92ca-0804cdff332b .rich-text {
    background: #000 !important;
}
#shopify-section-template--21686532997438__654c9d1a-9663-4a22-92ca-0804cdff332b .rich-text h2 {
    color: #fff !important;
}
1 Like

Hi, black background colour and white fonts

Hi @KabirDev , thanks for replying. do i copy the code wholesale? The message - correct the errors to save your custom CSS appeared when i copied and pasted the code into the custom CSS

@tuckermax add the code to your base.css or theme.css or style.css. You can add it at the very end of the CSS file.

1 Like

Thanks a lot @KabirDev !

1 Like