mphdesign Posted August 28, 2023 Share Posted August 28, 2023 (edited) I'd like to reduce the width of my add-to-cart button on all product pages. They max out the width of the product box and look quite odd... I'd prefer them to be about 50%. https://www.porfiriogutierrez.com/shop Edited August 28, 2023 by mphdesign url Link to comment
Lesum Posted August 28, 2023 Share Posted August 28, 2023 @mphdesign You can try adding this code snippet under Website > Utilities > Website Tools > Custom CSS .tweak-products-add-to-cart-button.plp-add-to-cart .products.collection-content-wrapper .plp-grid-add-to-cart { justify-content: center !important; align-items: center !important; } .ProductItem-details .sqs-add-to-cart-button-wrapper { width: 35% !important; } @media only screen and (max-width: 640px) { .ProductItem-details .sqs-add-to-cart-button-wrapper { width: 50% !important; } } If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
mphdesign Posted August 28, 2023 Author Share Posted August 28, 2023 Thank you - that worked! If I want to fiddle with the width, which settings do I customize? Lesum 1 Link to comment
Lesum Posted August 28, 2023 Share Posted August 28, 2023 (edited) Awesome! To adjust the width on the shop page, you can change the width "70%" inside this block of code. You've to add this block of code with the previous code. section.plp-grid-add-to-cart .sqs-add-to-cart-button-wrapper { width: 70% !important; } And to adjust the width on the product page, you can change the width "35%" inside this block of code. You added this block of code already: .ProductItem-details .sqs-add-to-cart-button-wrapper { width: 35% !important; } Edited August 29, 2023 by Lesum Updated the first block of code If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
mphdesign Posted August 28, 2023 Author Share Posted August 28, 2023 Thanks - when I add that first snippet of code above I don't see a change (even when I try other numbers other than 70%). Do I delete any of the other code you gave me? Link to comment
Lesum Posted August 29, 2023 Share Posted August 29, 2023 @mphdesign Can you try the updated code? Here's the entire version: .tweak-products-add-to-cart-button.plp-add-to-cart .products.collection-content-wrapper .plp-grid-add-to-cart { justify-content: center !important; align-items: center !important; } .ProductItem-details .sqs-add-to-cart-button-wrapper { width: 35% !important; } section.plp-grid-add-to-cart .sqs-add-to-cart-button-wrapper { width: 70% !important; } @media only screen and (max-width: 640px) { .ProductItem-details .sqs-add-to-cart-button-wrapper { width: 50% !important; } } If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
mphdesign Posted August 29, 2023 Author Share Posted August 29, 2023 Thank you so much, this worked! I really appreciate your help! Link to comment
JocelynMPC Posted May 31 Share Posted May 31 (edited) This mostly worked for me, but does not centre the add to cart button... www.mightypines.ca Edited May 31 by JocelynMPC Link to comment
tuanphan Posted June 2 Share Posted June 2 On 6/1/2024 at 12:18 AM, JocelynMPC said: This mostly worked for me, but does not centre the add to cart button... www.mightypines.ca To center it, use this code .tweak-product-basic-item-add-to-cart-standalone .ProductItem .sqs-add-to-cart-button-wrapper { margin: 0 auto; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
JocelynMPC Posted June 14 Share Posted June 14 Hmmm, didn't work. I'm refering to the botton on the product page if that helps? Link to comment
tuanphan Posted June 16 Share Posted June 16 On 6/14/2024 at 11:30 PM, JocelynMPC said: Hmmm, didn't work. I'm refering to the botton on the product page if that helps? I see it already center Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment