Align Buy Button center for mobile

Hi, I am struggling to align my Buy Button center for screens smaller than desktop. I want the button to be aligned left for desktop, which it currently is, but I cannot find how to target it for smaller screens.

See button on website here: https://leejamesabbott.com/inner-impulsion.html

2 Likes

i think you want this one

Go to online store ----> themes ----> go to three Dots ----> edit code ---->find theme.liquid files ----> place the code ---->
before the body ----->
if this code work please do not forget to like and mark it solution

Hey @Leeeroy

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 solve your problem then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

hello @Leeeroy

1.Go to Online Store
2) Edit Code
3) Find theme.liquid file

  1. Add the following code in the bottom of the file above tag
@media screen and (max-width: 767px) {
.shopify-buy__btn-wrapper {
    text-align: center !important;
}
}

thanks

Hi @Leeeroy ,

Please send the website link, I will check it for you

Thanks, but this is not a theme. I’ve tried putting this before the as you sugested but it does not work. I also tried within the tag but it does not work either. Any suggestions?

Thanks, but this is not a theme. I’ve tried putting this before the as you suggested but it does not work. Any suggestions?

Hi, thanks: https://leejamesabbott.com/beyond-the-surface.html

Thanks, but this is not a theme. I’ve tried putting this before the as you suggested but it does not work. Any suggestions?

Hi @Leeeroy ,

I checked and it is an HTML page, not Shopify.

Is this what you want?

Yes, I am using the Shopify buy button on a HTML page

Hi @Leeeroy ,

Please send me the HTML render code, I will check and change it

LJA Art
Inner Impulsion
Inner Impulsion

"Inner Impulsion"

18"x24" Acrylic on glass, acrylic on paper.

2022

Mental well-being is a vital part of a thriving life, and open conversations can foster understanding, connection, and support. When we replace stigma with compassion, we create a world where everyone feels seen, heard, and empowered to seek help when needed.


My exhibition, 1 in 3, highlights the reality that one in three adults in Canada will experience mental health challenges at some point in their lives. Through art, they spark meaningful dialogue, encourage healing, and inspire a more compassionate society—one where mental health is embraced as an essential part of our shared experience. In support of this mission, 20% of sales from the show were donated to the Canadian Mental Health Association, helping to provide resources and support for those in need.

Lee James Abbott

Painter & Printmaker living in beautiful British Columbia.
Stay updated on new prints and projects on my mailing list

©

© LJA
Work | Shop | Say Hello
@media screen and (max-width: 767px) { .shopify-buy__btn-wrapper { margin-top: 5px !important; margin-left: 10px !important; } button.shopify-buy__btn { display: flex !important; justify-content: center !important; } }

Hi @Leeeroy ,

Please change all code: