Centre Specific Rich Text on Mobile

Hello,

Can someone give me the css that I can put into the specific section code to align only on this rich text section? Instead of going through base css

I want it centred on mobile, left on desktop. Thank you!

URL: https://www.livwithin.com.au/?_ab=0&_fd=0&_sc=1

PW: pewpog


try this one and if this is help ful to you then please do not forget to like and mark it solution


in desktop try this one

Hello @ellacoker
Go to online store ----> themes ----> actions ----> edit code ----> base.css
add this code at the end of the file and save.

@media screen and (max-width: 768px) {
.rich-text__heading.rte.inline-richtext.h2.scroll-trigger.animate--slide-in {
text-align: center;
margin-bottom: 17px !important;
}
}

result

If this was helpful, hit the like button and accept the solution.
Thanks

Hey @ellacoker

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

Please add this code to Custom CSS of that section.

@media (max-width: 749px) {
h2 { text-align: center; }
}

Hello, for some reason, this didnt work. Please see screenshot

Hi @ellacoker

This is Richard from PageFly - Shopify Page Builder App

Please add this code to your theme.liquid above the to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the

<style>
@media (max-width: 767px) {
#shopify-section-template--19130582892786__rich_text h2 {
    font-size: 18px;
    text-align: center;
}
}
</style>

Hope this can help you solve the issue

Best regards,

Richard | PageFly