How can I center and resize a specific rich text block?

Hi!

We are using this code to justify rich text blocks.

.rich-text__blocks {text-align: justify;font-size: 12px;}
@media screen and (min-width: 990px) {.rich-text__blocks {font-size: 19px;}}

However, our short text is now sticking at the left border of the box. Is there a way of targeting a specific rich-text block and change its size and positioning? Our goal is to have it centered.

shop url: monomshop.co (pw sheupu)

Thanks in advance!

Cheers,

monomshop

1 Like

Hi @monomgroup

  1. From your Admin Page, click Online Store > Themes >Actions > Edit code
  2. In the Asset folder, open the base.css
  3. Paste the code below at the very bottom of the file.
#shopify-section-template--16405963964634__rich_text > div > div > div > div {
    text-align: center;
    width: max-content;
    margin: auto;
}

1 Like

Hi @made4Uo

That worked perfectly! Thanks

1 Like