• Resolved michaelwellnerwp

    (@michaelwellnerwp)


    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

    (@mrclayton)

    Hi @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.