A Shopify store owner needs CSS code to center-align a rich text section on mobile devices while keeping it left-aligned on desktop, preferably without modifying the base CSS file.
Multiple solutions proposed:
Adding CSS to base.css file targeting the specific rich text heading class with media queries for mobile screens (max-width: 768px)
Inserting custom CSS in theme.liquid file above the or tag
Using section-specific custom CSS targeting h2 elements within media queries
Current status:
The original poster reported that at least one suggested solution didn’t work (shown via screenshot). The most recent response provides a targeted solution using the specific section ID (#shopify-section-template–19130582892786__rich_text) to be added to theme.liquid, which may be more precise than previous generic approaches.
The discussion remains ongoing as the issue hasn’t been confirmed resolved. Screenshots demonstrate the desired mobile centering effect that multiple contributors are attempting to achieve.
Summarized with AI on October 30.
AI used: claude-sonnet-4-5-20250929.