alibaba
alibaba

Reputation: 61

Woocoomerce only change single product page button css

I have a Add to Cart button on Single Product page and I want to alter its looking. I do not want to change other buttons on my site.

.woocommerce #content input.button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce-page #content input.button,
.woocommerce-page #respond input#submit,
.woocommerce-page a.button,
.woocommerce-page button.button,
.woocommerce-page input.button {
    background: #f2a700 none repeat scroll 0 0 !important;
    border: 2px solid #f2a700;
    color: #fff !important;
    margin-top: -4px;
    width: 57%;
}

Upvotes: 2

Views: 571

Answers (1)

UncaughtTypeError
UncaughtTypeError

Reputation: 8722

Use the single-product class included in the <body> tag of every WooCommerce Single Product page:

CSS

.single-product .single_add_to_cart_button {

    /* Style your button here */

}

Upvotes: 1

Related Questions