We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to center button and Footer text for mobile only

Solved

How to center button and Footer text for mobile only

GeorgeRizos
Pathfinder
132 1 19

Hi there, 

 

I would like to center this button on my website for mobile view only.

Screenshot 2023-09-04 143622.png

 

I also would like to center these texts boxes on mobile view only.

Screenshot 2023-09-04 143640.png

my website url is: https://thesnoozy.com/

Accepted Solution (1)

Moeed
Shopify Partner
7764 2082 2568

This is an accepted solution.

Hey @GeorgeRizos 

 

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>
@media screen and (max-width: 767px) {
div#ImageWithText--template--19311720202589__4498c6aa-31c3-4fae-8565-7f41780e682f {
    text-align: -webkit-center;
}
a.button.button--primary {
    place-self: center;
}
h2.footer-block__heading.inline-richtext {
    text-align-last: center;
}
a.link.link--text.list-menu__item.list-menu__item--link {
    justify-content: center;
}
}
</style>

RESULT:

Moeed_0-1693831672508.png

 

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

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


View solution in original post

Replies 3 (3)

Moeed
Shopify Partner
7764 2082 2568

This is an accepted solution.

Hey @GeorgeRizos 

 

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>
@media screen and (max-width: 767px) {
div#ImageWithText--template--19311720202589__4498c6aa-31c3-4fae-8565-7f41780e682f {
    text-align: -webkit-center;
}
a.button.button--primary {
    place-self: center;
}
h2.footer-block__heading.inline-richtext {
    text-align-last: center;
}
a.link.link--text.list-menu__item.list-menu__item--link {
    justify-content: center;
}
}
</style>

RESULT:

Moeed_0-1693831672508.png

 

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

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


ZestardTech
Shopify Partner
6161 1100 1479

Hello there,

 

1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > base.css and paste this at the bottom of the file:

 

@media screen and (max-width: 769px){
#shopify-section-template--19311720202589__4498c6aa-31c3-4fae-8565-7f41780e682f .button {
margin: 0 auto;
margin-top: 10px;
}
.footer-block.grid__item.footer-block--menu {
margin: 0 auto;
text-align: center;
}
.footer-block__details-content .list-menu__item--link {
justify-content: center;
}
}

 

ZestardTech_0-1693831866221.pngZestardTech_1-1693831879007.png

 

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing

David_SHT
Globetrotter
605 125 129

Hi @GeorgeRizos ,

This is David at SalesHunterThemes.

Thank you for your question. 

 

You can try to follow these steps:

Go to Online Store -> Themes -> Actions -> Edit code.

Go Assets folder -> theme.liquid file.

Add the following code in the bottom of the file above </body> tag

 

<style>
@media screen and (max-width: 749px) {
 .footer-block.grid__item {
   text-align: center !important;
 }
 .footer-block__details-content .list-menu__item {
   justify-content: center !important;
 }
}
</style>

 

David_SHT_0-1693831881705.png

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

David | SalesHunterThemes team

We create fast Shopify themes, focusing on exceptional performance and seamless experience across all devices.

Try our Electro theme Free! (Now at Black Friday price)