Reputation: 29
I am working on a WordPress website with WooCommerce. I want to style class .content-area but only on product category pages. If I was to pick a single category (for example category with tag ID 15), my CSS code would look like this:
.term-15 .content-area {
margin-top:0;
}
This works, but it only styles the .content-area element on that particular product category #15. What I'm after is to style that element on all product categories - BUT NOT on the rest of the website. I was trying to research the wildcard selector, but can't figure it out:
[class^='term-'] .content-area {
margin-top:0;
}
Is there a way to achieve this by using a wildcard; or any other way?
Cheers
Upvotes: 0
Views: 299
Reputation: 29
Figured it out. A simple solution:
.tax-product_cat .content-area {
margin-top:0;
}
Upvotes: 1