How to change size of add to cart button?

Solved

How to change size of add to cart button?

MGNetworks
Excursionist
21 1 11

Hi dear folks, i'm trying to resize this add to cart button to full width of the page, it doesn't look professional if it's aligned to left side and now full width to the right side.

How could i do this?

I think it's a simple fix by adding some css anywhere but i can't seem to figure it out.

in case u wanna check urself: https://lushloots.com/products/emilie

 

add to cart button size.png

Accepted Solution (1)
Moeed
Shopify Partner
6567 1783 2161

This is an accepted solution.

Hey @MGNetworks 

 

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) {
button#ProductSubmitButton-template--19142479642958__main {
    width: 100% !important;
}
}
</style>

RESULT:

Moeed_0-1695905820535.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 7 (7)

MGNetworks
Excursionist
21 1 11

To be clear: This is mobile version, desktop version is alright.

Moeed
Shopify Partner
6567 1783 2161

This is an accepted solution.

Hey @MGNetworks 

 

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) {
button#ProductSubmitButton-template--19142479642958__main {
    width: 100% !important;
}
}
</style>

RESULT:

Moeed_0-1695905820535.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


MGNetworks
Excursionist
21 1 11

Thanks alot, this one worked!

I knew it was something with button#ProductSubmitButton-template--19142479642958__main !! But i couldn't figure out for sure.

Thanks a lot.

Moeed
Shopify Partner
6567 1783 2161

Thank you for your reply. I'm glad to hear that the solution worked well for you. If you require any more help, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


Stunny
Tourist
10 0 3

but what if i want to size it on full screen? so there is no gap on the left and right hand side. im using the dawn theme and tried to change the css of . product__info-wrapper, . product-form, . product-form__buttons... nothing worked even with !important. I need your help haha

ZestardTech
Shopify Partner
6007 1076 1446

Hello There,

 

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

 

.a2cknop {
width: 100%;
}
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
MGNetworks
Excursionist
21 1 11

I tried this one also before, because i made the a2cknop class myself.

But this doesn't work unfortunately.