I want to target some woocommerce elements on my website and change color and make some css changes. When using the inspector on my website I find:
<div class="woocommerce-form-coupon-toggle">
and assume I could write the following as a css code in wordpress
.woocommerce-form-coupon-toggle {
background-color #000000 !important;
}
When doing this, nothing happens.
3
Answers
The property and value in CSS should be separated by a colon
:
. Like the following:Try to check for the whole tree, class by class. it should become a larger property, but would work.
I assume you are styling the toggle coupon form in the checkout form. See image
You should be styling the
.woocommerce-form-coupon-toggle .woocommerce-info
not the.woocommerce-form-coupon-toggle
alone.To do this try this code.