top/bottom padding woocommerce not working
-
Hi,
I've been trying to adjust top/bottom padding for add to cart button for WooCommerce, but changes won't apply.
Thanks -
link please ?

for me it works
-
my bad!


-
ah i understand now, i thought you meant a different setting
so this setting does not affect "the add to cart button"
but it does affect the buttons in checkout and cart: yourwebsite.com/cart/

the reason for why the add to cart button has a fixed height thats not changeable is, because historically we only had these big inputs you can see below and i wanted the button to always have the same height as these inputs:

do you want to change the button paddings for the element:
+woocommerce → +add to cart button?if so use this css below.
change height and line-height for changing the height.
make sure line-height is 2px smaller than height.for changing space left and right, change padding-left and padding-right values.
a.button.add_to_cart_button{ height: 52px!important; line-height: 50px!!important padding-top: 0 !important; padding-bottom: 0 !important; padding-left: 10px!important; padding-right: 10px!important; }Enter this css in "lay options" -> "custom css & html" -> "custom css for desktop"
or "css for mobile" -
for changing the add to cart button on the single product page use:
.single-product .single_add_to_cart_button{ height: 52px!important; line-height: 50px!!important padding-top: 0 !important; padding-bottom: 0 !important; padding-left: 10px!important; padding-right: 10px!important; } -
ok after reviewing this it seems that the padding top / bottom only applies to like 2 buttons
so i will remove this setting
i will introduce a new setting for the button height
but the setting "padding left/right" seems to apply to every button
-
if u update lay theme now u will have this setting:
Add to Cart Button Height (px)
so you dont need to use the custom css i wrote
-
thank you!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login