Re: Center text on mobile view

Solved

Center text on mobile view

needelp
Tourist
11 0 3

Hello some text is centered some is left aligned in image with text-text. How do I center it

 

1000004682.jpg

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
8172 1966 2403

This is an accepted solution.

Hi @needelp 

Check this one. 

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

 

@media only screen and (max-width: 749px){
.image-with-text__text.rte.body {
    text-align: center;
}
h2.image-with-text__heading.inline-richtext.h2 {
    align-self: center
}
}

 

And Save. 

Result:

Made4uoRibe_0-1725290851783.png

 

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

View solution in original post

Replies 6 (6)

Sangeetanahar
Explorer
541 36 69

hello @needelp 

can you send me the Website URL

thanks

Was I helpful?

Buy me a coffee



Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront
Email me -sangeetarahuldhiman@gmail.com - Skype: live:sangeetarahuldhiman -Whatsapp: +917009811712
Checkout Some Free Sections Here

BSSCommerce-HDL
Shopify Partner
2292 842 1057

Hi @needelp

<style>
@media only screen and (max-width: 749px) {
h2.image-with-text__heading.inline-richtext {
    text-align: center !important;
    width: 100% !important;
}

.image-with-text__text.rte.body {
    text-align: center !important;
}
}
</style>

Here is result: 

BSSCommerceHDL_0-1725288338714.png

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

needelp
Tourist
11 0 3

Thanks where do I put it?

BSSCommerce-HDL
Shopify Partner
2292 842 1057

Hi @needelp, You can try: 

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert that code above </head> tag

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

topnewyork
Globetrotter
633 114 134

Hi @needelp ,

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>

 

<style>
@media only screen and (max-width: 749px) {
h2.image-with-text__heading.inline-richtext {
    text-align: center !important;
    width: 100% !important;
}

.image-with-text__text.rte.body {
    text-align: center !important;
}
}
</style>

 

If my reply is helpful, kindly click like and mark it as an accepted solution.

Thanks!

Need a Shopify developer?
Hire us at Top New York Web Design
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel

Made4uo-Ribe
Shopify Partner
8172 1966 2403

This is an accepted solution.

Hi @needelp 

Check this one. 

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

 

@media only screen and (max-width: 749px){
.image-with-text__text.rte.body {
    text-align: center;
}
h2.image-with-text__heading.inline-richtext.h2 {
    align-self: center
}
}

 

And Save. 

Result:

Made4uoRibe_0-1725290851783.png

 

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.