Title: Cannot override CSS
Last modified: November 27, 2020

---

# Cannot override CSS

 *  Resolved [michaelwellnerwp](https://wordpress.org/support/users/michaelwellnerwp/)
 * (@michaelwellnerwp)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/cannot-override-css/)
 * I use braintree payment gateway and would like to override styles for input fields
   if there is an error.
 *     ```
               body.wc-braintree-body .wc-braintree-new-payment-method-container .form-group .braintree-hosted-fields-invalid {
                   border: 1px solid red !important;
                   box-shadow: none !important;
               }
       ```
   
 * I put this in my child theme stylesheet, however the rules do not get applied.
   Also when I put these styles at the end of my footer.php I still see the default
   braintee css.
 * How can I solve this problem?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/cannot-override-css/#post-13717511)
 * Hi [@michaelwellnerwp](https://wordpress.org/support/users/michaelwellnerwp/),
 * The CSS that you wrote is specific to the bootstrap custom form. You most likely
   are using a different form and thus the CSS you wrote is not being used.
 * Here is a more general purpose CSS that will target the credit card form when
   the field is invalid.
 *     ```
       body.wc-braintree-body li .wc-braintree-new-payment-method-container .braintree-hosted-fields-invalid {
           border: 1px solid red !important;
           box-shadow: none !important;
       }
       ```
   
 * Kind Regards,

Viewing 1 replies (of 1 total)

The topic ‘Cannot override CSS’ is closed to new replies.

 * ![](https://ps.w.org/woo-payment-gateway/assets/icon-256x256.png?rev=2142799)
 * [Payment Plugins Braintree For WooCommerce](https://wordpress.org/plugins/woo-payment-gateway/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-payment-gateway/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-payment-gateway/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-payment-gateway/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-payment-gateway/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-payment-gateway/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/cannot-override-css/#post-13717511)
 * Status: resolved