What's your biggest current challenge? Have your say in Community Polls along the right column.

Button text center align

Solved

Button text center align

sunday_april
Tourist
6 0 0

Hi all,

I have 2 questions in regards to the ADD TO CART button.

1. Is it possible to reduce the length of the button?
2. How do I make the button text center-aligned? 

Thank you for your help!! 

Page: wooffantasy.comScreenshot 2024-11-04 at 10.20.00 am.png

Accepted Solution (1)

Dan-From-Ryviu
Shopify Partner
10344 2054 2137

This is an accepted solution.

Please add this code to Custom CSS in Online Store > Themes > Customize > Theme settings 

.product-form__buttons .product-form__submit { justify-content: center !important; } 

Screenshot 2024-11-04 at 10.28.32.png

- Helpful? Like and Accept solution! Or Support me: Buy Coffee
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

View solution in original post

Replies 5 (5)

Dan-From-Ryviu
Shopify Partner
10344 2054 2137

This is an accepted solution.

Please add this code to Custom CSS in Online Store > Themes > Customize > Theme settings 

.product-form__buttons .product-form__submit { justify-content: center !important; } 

Screenshot 2024-11-04 at 10.28.32.png

- Helpful? Like and Accept solution! Or Support me: Buy Coffee
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Moeed
Shopify Partner
6370 1725 2088

Hey @sunday_april 

 

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>
.product-form__submit {
    max-width: 30rem !important;
    justify-content: center !important;
}
</style>

RESULT:

Moeed_0-1730691023615.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!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


DaisyVo
Shopify Partner
1080 140 155

Hi @sunday_april 

 

You can use this code here:

.product-form__buttons button.product-form__submit {
    max-width: 30rem !important;
    justify-content: center !important;
}

 

You can add in custom CSS field:

DaisyVo_0-1730691608705.png

Hope this can help!

 

Best,

Daisy

 

 

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

GTLOfficial
Shopify Partner
681 146 144

Hello @sunday_april 
Go to online store ----> themes ----> actions ----> edit code ---->base.css
add this code at the end of the file and save.

.product__info-container * {
justify-content: center !important;
}

result
49.png

If this was helpful, hit the like button and accept the solution.
Thanks

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh

EvinceDev
Shopify Partner
121 13 13

Hello, @sunday_april try this code

.product-form__buttons .product-form__submit {
    justify-content: center !important;
    max-width: 300px;
}
Shopify Theme Advanced Backend Developer and Debugger
Want to modify or develop new app, Hire us.
If our Answer is helpful then please Like and Accept Solution!
I am an eCommerce and Marketing Technology consultant based in India.
To inquire about consulting work availability, You can reach me on Skype by live: rahul.evince or mail on partners@evincedev.com.
Shopify Apps URL :- https://apps.shopify.com/partners/gemfind1
Customization on Shopify Theme | Shopify App Development | SEO & Digital Marketing