Rich Text - Remove margins on desktop and centre on mobile

Topic summary

A Shopify store owner is seeking CSS customization for a rich text block with two specific requirements:

Desktop: Remove margins so the text aligns with the logo (approximately 95% width)

Mobile: Center the rich text block

Screenshots were provided showing the current layout issues on both desktop and mobile views.

Progress:

  • Store password was shared to enable troubleshooting
  • LizHoang provided custom CSS code targeting .accordion summary and .collapsible-content-wrapper-narrow classes to be added to the base.css file
  • The proposed solution included centering accordion summaries and adjusting margins to 15%

Current Status:
The issue remains unresolved — the original poster confirmed the suggested CSS code did not work as intended. No alternative solutions have been offered yet.

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

Hi there,

I would like to remove the margins of the rich text block so that it comes in line with my logo on desktop version, i believe this is 95%. And on the mobile version I would like to centre the rich text block. Please see images attached.

Thank you in advance.

Hi @ellacoker

Please share the password of your store

Best,

Daisy

password ellacoker

were you able to have a look? thanks daisy

Hi James,

I would love some help with the code for that please!

Hi Ellacoker

  • You can try to follow this step
    Step 1: Go to Edit code
    Step 2: Find file base.css and add this code at the end of the file
.accordion summary {
    justify-content: center !important;
}

.collapsible-content-wrapper-narrow {
    margin: 0 15% !important;
    max-width: 100% !important;
}

Result:

Best,
Liz

Hi Liz, unfortunately that didnt work :disappointed_face: