Solved

How to adjust width of "Add to Cart" button (I would like it smaller).

FashionizerSpa
Tourist
5 1 1

I am having issues finding a solution that works for my website but my "Add to Cart" buttons are too wide. Is there a way adjust this with the code to make it about half the width.

My website is https://hoteluniformshop.com/ and my theme is Testament (We Are Underground)

FashionizerSpa_0-1713348020809.png

 

Accepted Solution (1)

theycallmemakka
Shopify Partner
1484 337 360

This is an accepted solution.

Hi @FashionizerSpa 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>

<style>
.product__section--buttons.product-add {
    max-width: 350px;
}
</style>

theycallmemakka_0-1713349491393.png

 

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
Makka

Buy me a Coffee


Enjoy Shopify for $1. Sign up now


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

View solution in original post

Replies 3 (3)

aldy-expatify
Shopify Partner
57 5 10

Hi @FashionizerSpa 

You can go to the edit code and find the product-detail.liquid (I am not sure of the file name. You can give me the screenshot of the section that contains product.liquid)

After that, you can search this line of code and change the span-6 to span-4 or span-3

aldyexpatify_0-1713348645676.png

 

If you don't mind, you can give me access as collaborator to see your theme files.

If you like our solution, please like and mark it as a solution.
Don't hesitate to reach us for more Shopify solutions. Thanks 🙂
Website: Expatify Indonesia
Email: guru@expatify.co.id
Whatsapp: Whatsapp

SAN_MSWEB
Shopify Expert
1105 131 137

Hello,

 

I am San from MS Web Designer.

 

Go to Themes > Edit code > Theme.liquid > at the bottom place this code before </body>

 

 

<style>
.template-product  .product-form__buttons {display: flex; justify-content: space-between;}
.template-product  .product-form__buttons #addToCart[type="submit"]{width: 49% !important; height: 45px;}
.template-product  .product-form__buttons .shopify-payment-button{width:49% !important;margin-top: 0;}

@media (max-width:550px){
.template-product  .product-form__buttons{ flex-wrap:wrap}
.template-product  .product-form__buttons button[type="submit"]{width: 100% !important; height: 45px;}
.template-product  .product-form__buttons .shopify-payment-button{width:100% !important;margin-top: 15px;}
}
</style>

 

 

Hope this helps.

 

If you have any queries do let me know.

 

Regards,

San



If it’s helpful to you, please mark it as a solution.  


Need Help with Shopify Design, Migration, Speed, or Custom tasks?  
email: hi@mswebdesigner.com
Try Our Conversion Booster app to get more sales | Connect Our Founder Linkedin

theycallmemakka
Shopify Partner
1484 337 360

This is an accepted solution.

Hi @FashionizerSpa 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code just above tag </body>

<style>
.product__section--buttons.product-add {
    max-width: 350px;
}
</style>

theycallmemakka_0-1713349491393.png

 

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
Makka

Buy me a Coffee


Enjoy Shopify for $1. Sign up now


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com