Site logo

Archived topic

Add to Cart Shortcode from Woocommerce

3 replies · Started by Paul on December 24, 2022

Viewing posts 1–4 of 4

Woocommerce's [add_to_cart id="16521"] includes a lot of styling I am trying to remove.

https://www.sandandsteelfitness.com/test/

I would like to remove the border, padding, button, etc. Basically I just want to display the regular and sale price.

I am struggling to fix this, since it seems the styling code is affecting element.style and I don't know how to select that with standard css overrides.

Thank you!!!

Hi there,

those elements have inline styles ie. there is a style=" attribute in its HTML, thats what you see as the element.style.
You can use CSS to override them but you need to use !important like so:

.add_to_cart_inline {
    border: 0 !important;
    padding: 5px !important;
}

Thank you... this code works great.

-Paul

You're welcome

This archived topic is closed to new replies.