Make 'add to cart' button wider

Solved

Make 'add to cart' button wider

sarpow
Tourist
27 0 2

I want to make the 'add to cart' button wider on my home screen

Accepted Solution (1)

Dan-From-Ryviu
Shopify Partner
10793 2133 2251

This is an accepted solution.

Hi @sarpow 

You can add this code to Custom CSS of Image with text section that you want the button wider

 

.button {
    padding: 16px 40px;
    font-weight: 700;
    font-size: 20px;
}

Screenshot 2025-01-10 at 10.05.35.png

 

 

- Solved it? Hit Like and Accept solution! ❤️Buy Me 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 8 (8)

suyash1
Shopify Partner
10498 1293 1657

@sarpow - can you share the page link?

Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
sarpow
Tourist
27 0 2

Dan-From-Ryviu
Shopify Partner
10793 2133 2251

This is an accepted solution.

Hi @sarpow 

You can add this code to Custom CSS of Image with text section that you want the button wider

 

.button {
    padding: 16px 40px;
    font-weight: 700;
    font-size: 20px;
}

Screenshot 2025-01-10 at 10.05.35.png

 

 

- Solved it? Hit Like and Accept solution! ❤️Buy Me 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.

suyash1
Shopify Partner
10498 1293 1657

@sarpow 

please add this css to the very end of your base.css file and check,
Shopify Admin -> Online Store ->Theme -> Edit code -> base.css
 

 

.image-with-text .grid__item a.button{width: 100%;}

 

Support me | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
sarpow
Tourist
27 0 2

.button {
padding: 14px 112px;
font-weight: 700;
font-size: 20px;
}

i changed it to this code above to look the best on desktop, but on mobile the order of the text on the button changes, is there a way to keep it the same for both mobile and desktop

Dan-From-Ryviu
Shopify Partner
10793 2133 2251

Please try to change code to this 

.button {
padding: 14px 96px;
font-weight: 700;
font-size: 20px;
}

- Solved it? Hit Like and Accept solution! ❤️Buy Me 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.

sarpow
Tourist
27 0 2

is there any way to have a size for desktop and then a different size for mobile?

Dan-From-Ryviu
Shopify Partner
10793 2133 2251

Sure, please use this code 

.button {
padding: 14px 112px;
font-weight: 700;
font-size: 20px;
}
@media (max-width: 749px){
.button {
padding: 14px 96px !important; /* change numbers to set width of button on mobile */
}
}

- Solved it? Hit Like and Accept solution! ❤️Buy Me 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.