All things Shopify and commerce
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
Solved! Go to the solution
This is an accepted solution.
Hi @ellacoker
This is Richard from PageFly - Shopify Page Builder App
Please add this code to your theme.liquid above the </head> 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 </head>
<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
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
<style>
@media screen and (max-width: 767px) {
h2.rich-text__heading.rte.inline-richtext.h2.scroll-trigger.animate--slide-in {
text-align: center;
margin-bottom: 15px;
}
}
</style>
try this one and if this is help ful to you then please do not forget to like and mark it solution
<style>
@media screen and (min-width: 768px) {
h2.rich-text__heading.rte.inline-richtext.h2.scroll-trigger.animate--slide-in {
margin-left: -20px !important;
}
}
</style>
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 </body> tag
<style>
.rich-text__blocks {
text-align: -webkit-center !important;
}
</style>
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; }
}
- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Hello, for some reason, this didnt work. Please see screenshot
This is an accepted solution.
Hi @ellacoker
This is Richard from PageFly - Shopify Page Builder App
Please add this code to your theme.liquid above the </head> 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 </head>
<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
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025