How to align "Rich text" to the right

Hey guys, I added rich text and I want to align it so that it’s in exactly the same position as the text below it
(it’s the same text, but I’ll delete the one below because it’s an image with text, with a white background and on mobile, there’s some space, so I need to replace it with rich text.).

So I just want to change the width of it to make it the same as the text underneath.

Here’s my store: https://1049xn-ya.myshopify.com/products/editing-masterclass
(Just scroll a little down, it’s there)

Thanks a lot,
Tim

1 Like

Hi @CreatorTim

Just to clarify, you like to align the rich text same width with the image with text below right?

If it is, try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
.rich-text.content-container .rich-text__wrapper--right {
        justify-content: flex-start;
    }

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

Hi @CreatorTim

To complete your requests, please follow these steps:

  1. Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
  2. Paste the code provided into the Custom CSS section.
@media screen and (min-width: 1024px){
section#shopify-section-template--22711083893001__rich_text_rCVbgQ .rich-text__blocks * {
    max-width: 400px;
    margin-left: auto !important;
    margin-right: 50px;
}
}

Here is the result:

I hope this helps

Best,

Daisy

1 Like

Thank you! Got it