How to change Add to cart button size on collection page (Horizon Theme)

Solved

How to change Add to cart button size on collection page (Horizon Theme)

TPennell
New Member
6 0 2

Hi,

 

How do I change the add to cart button size to make it smaller? OR how do I just make it smaller on mobile? when views on mobile the button is cut off due to the size. Below is a reference photo from dekstop. 

 

TPennell_0-1749487152022.png

 

Accepted Solution (1)
Betterave-Nina
Tourist
55 5 7

This is an accepted solution.

Hi @TPennell.

 

You can add the following code at the bottom of your base.css 

 

@media screen and (max-width: 749px) {
	.product-form-buttons > *:not(.quantity-selector) {
	  flex: unset!important;
	  margin: 0 auto!important;
	}
}

 

The result should be:

Screenshot_3.png

 

I hope this helps!

 

If your question was answered, please mark it as an Accepted Solution

➡➡   Easy Embed Code   ⬅⬅ insert CSS/JS/HTML/Liquid code into any store page



Speed Booster App - Improve your store speed in 3 clicks
Need professional help with your Shopify store? DM me, let's talk!
Geeky notes

View solution in original post

Replies 11 (11)

Betterave-Nina
Tourist
55 5 7

Hi @TPennell. Welcome to the Shopify Community!

 

It can be done with an additional CSS rule. Can I see an URL with the button?

➡➡   Easy Embed Code   ⬅⬅ insert CSS/JS/HTML/Liquid code into any store page



Speed Booster App - Improve your store speed in 3 clicks
Need professional help with your Shopify store? DM me, let's talk!
Geeky notes
TPennell
New Member
6 0 2

Hi,

 

Thanks for your reply 

 

www.deckstar.co.uk

pokerphone

 

Betterave-Nina
Tourist
55 5 7

This is an accepted solution.

Hi @TPennell.

 

You can add the following code at the bottom of your base.css 

 

@media screen and (max-width: 749px) {
	.product-form-buttons > *:not(.quantity-selector) {
	  flex: unset!important;
	  margin: 0 auto!important;
	}
}

 

The result should be:

Screenshot_3.png

 

I hope this helps!

 

If your question was answered, please mark it as an Accepted Solution

➡➡   Easy Embed Code   ⬅⬅ insert CSS/JS/HTML/Liquid code into any store page



Speed Booster App - Improve your store speed in 3 clicks
Need professional help with your Shopify store? DM me, let's talk!
Geeky notes
TPennell
New Member
6 0 2

Lovely stuff Nina,

 

just for future proofing - Do you know of a way to adjust the size with a percentage? just incase, in future, I wish to play around with it a little more? If not, no problemo! 

 

(Below example if in future, I wanted 2 per line etc)

TPennell_0-1749561856223.png

 

Betterave-Nina
Tourist
55 5 7

Glad that it helped!

 

This is a flexbox, you can't really adjust it with percentages. Once the issue pops up, just post it on the forums, it won't be difficult to solve 🙂

➡➡   Easy Embed Code   ⬅⬅ insert CSS/JS/HTML/Liquid code into any store page



Speed Booster App - Improve your store speed in 3 clicks
Need professional help with your Shopify store? DM me, let's talk!
Geeky notes
TPennell
New Member
6 0 2

Great stuff - Appreciate your time and help

 

Betterave-Nina
Tourist
55 5 7

Anytime! Glad I could help!

➡➡   Easy Embed Code   ⬅⬅ insert CSS/JS/HTML/Liquid code into any store page



Speed Booster App - Improve your store speed in 3 clicks
Need professional help with your Shopify store? DM me, let's talk!
Geeky notes

Dan-From-Ryviu
Shopify Partner
11931 2340 2515

Hi @TPennell 

Could you share the link to your store? 

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

TPennell
New Member
6 0 2

Hi,

 

Thanks for your reply 

 

www.deckstar.co.uk

pokerphone

GTLOfficial
Shopify Partner
878 181 192

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

.product-form-buttons button {
width: 80%;
margin: 0 auto !important;
}

result
36.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
TPennell
New Member
6 0 2

Hi GTL,

 

thanks for the reply.

 

Have entered this in the base.css as below, saved and nothing has changed. Apologies if I am missing something. 

 

TPennell_0-1749544693931.png

TPennell_1-1749544774806.png