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
9855 2345 2942

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 are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Replies 5 (5)

BSSCommerce-HDL
Shopify Partner
2305 834 907

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
2305 834 907

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
Astronaut
1130 151 187

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
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month

Made4uo-Ribe
Shopify Partner
9855 2345 2942

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 are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.