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

Re: Reduce the size of 'ADD TO CART' button on collections (in mobile view)

Solved

Reduce the size of 'ADD TO CART' button on collections (in mobile view)

RaghavGoel1
Excursionist
41 0 12

Hi all, 

I was able to add a custom code to reduce the size of my 'add to cart' text. However I want to reduce the height of my add to cart button so that its thinner and matching with my text size. 

Please see the attached screenshot:

Screenshot 2024-07-19 at 1.16.07 AM.png


I want the height of the buttons to be reduced.

Screenshot 2024-07-19 at 1.16.07 AM.png


Link to my store - https://f40566-d3.myshopify.com/

Would be grateful if someone could assist please 🙂

Accepted Solution (1)

DanCodes
Shopify Partner
54 9 6

This is an accepted solution.

1. Go to Online-Store

2. Edit Code

3. Go to assets

4. Open 'quick-add.css'
5. Add style

.quick-add__submit.button.button--full-width.button--secondary {
@media(max-width: 991px) {
min-height: 20px;
}
}

 

If you'd like to support my work, you're welcome to treat me to a coffee here: Buy Me a Coffee
If you'd like to hire me, feel free to contact me: E-mail WhatsApp

View solution in original post

Replies 4 (4)

DanCodes
Shopify Partner
54 9 6

This is an accepted solution.

1. Go to Online-Store

2. Edit Code

3. Go to assets

4. Open 'quick-add.css'
5. Add style

.quick-add__submit.button.button--full-width.button--secondary {
@media(max-width: 991px) {
min-height: 20px;
}
}

 

If you'd like to support my work, you're welcome to treat me to a coffee here: Buy Me a Coffee
If you'd like to hire me, feel free to contact me: E-mail WhatsApp
RaghavGoel1
Excursionist
41 0 12

Thanks Danos! Worked well - have a good day 🙂

ritu_soni
Shopify Partner
3 1 1

Hi @RaghavGoel1 ,
Please go to base.css and add the following code:

.button, .shopify-challenge__button, .customer button, button.shopify-payment-button__button--unbranded {
    min-width: calc(12rem + var(--buttons-border-width)* 2);
    min-height: calc(2.5rem + var(--buttons-border-width)* 2);
}

 Screenshot 2024-07-19 at 1.43.39 AM.pngScreenshot 2024-07-19 at 1.43.16 AM.png

If my answer helped you, please show some support here:Buy me a coffee
RaghavGoel1
Excursionist
41 0 12

Hi Ritu, thanks for the solution, however, this did not seem to do the job. The buttons still look the same. 

Also, FYI this is the code I've used in section custom CSS to reduce font size and some other features- 

.quick-add__submit.button.button--full-width {
background-color: #ffff !important;
color: #056172 !important;
font-weight: 600;
font-size: 10px !important;
}