• Resolved jforts

    (@jforts)


    I’m looking to change the background color of the Woocommerce credit card payment form. The standard styling is a light gray color, but I’d like to make it white like the rest of the page. My WooCommerce button colors are a light subtle green, which is too close to the gray background so the “Place Order” button looks like it’s disabled. I’m afraid it will be confusing to customers.

    I found some CSS online that looked like it should work, but it doesn’t seem to have changed anything.

    Here’s the CSS I am using:

    .woocommerce #payment div.payment_box, .woocommerce-page #payment div.payment_box {
    background-color: #ffffff !important;
    }

    .woocommerce #payment div.payment_box:after, .woocommerce-page #payment div.payment_box:after {
    border: 0px !important;
    }

    #theme-page select, .woocommerce select {
    color: #ffffff; !important;
    }

    ul.payment_methods .payment_box p {
    background: #ffffff !important;
    }

    Is there something I’m missing? Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Themes vary. Please post the url to your site so the styles can be examined with browser tools.

    Thread Starter jforts

    (@jforts)

    Sorry, meant to do that in the original post. The url is:

    http://thewildsagecollective.com

    I can see custom styles in the child style.css file, in the theme customiser and in the standard WordPress field at: Appearance > Customise > Additional CSS. I’d put them all in just one place, probably the theme customiser.

    Try a service like this to make the styles easier to read:
    http://www.cleancss.com/css-beautify/

    box background to white:
    your css should work, but can’t find it in the page, did you take it out? Try just:

    .woocommerce #payment div.payment_box,
    .woocommerce-page #payment div.payment_box {
      background-color: #ffffff;
    }
    

    bottom border line:
    its not in the :after, so try:

    .woocommerce-checkout #payment ul.payment_methods {
      border-bottom-width:0;
    }
    

    button colours – these are defined in several places. To take precedence, put this at the end of the theme customiser styles:

    .woocommerce input.button,
    .woocommerce-page input.button {
      color: #ffffff;
      background-color: #444444;
    }
    

    That will probably apply to all woocommerce buttons on site. To make it apply to just the payment button, insert the #payment selector:

    .woocommerce #payment input.button {
    

    If any of this doesn’t work, leave it in the page so it can be debugged.

    Thread Starter jforts

    (@jforts)

    Hey, thanks for the reply. Sorry it took a few days to post back here. I got caught up in another project for the same client that took priority.

    I consolidated all the CSS as you recommended. And yes, I had forgotten that I removed that original CSS because I was trying out some other ideas (which didn’t work either).

    I added the CSS that you recommended but I’m still not seeing a change. I’ll leave it in so you can check it out.

    Thanks.

    I can’t find the css in the page. Where did you put it?

    Thread Starter jforts

    (@jforts)

    It’s in the Custom CSS box in my theme options main menu. I’m using the Divi theme. I can copy the CSS to another spot if you need me to.

    I’m looking at the section starting <style id="theme-customizer-css">, well the whole page really, in the markup, and its not there. Either its not saved or maybe I’m looking at some cached version.

    Thread Starter jforts

    (@jforts)

    That’s strange. But I just copied all the custom CSS over to the Additional CSS box under Appearance > Customize. It is saved/published and should be viewable.

    Its still not in with the theme customiser css, but I can now see it in the WP custom css section. The css is having the intended effect on the checkout page – white background, line gone & button colour deeper. Please check.

    Thread Starter jforts

    (@jforts)

    Awesome, thanks. I think we’re 99% there! I was actually trying to make the outer box white though (the box that contains the words “Credit Card (Square)” with the credit card icons). Is that possible?

    .woocommerce-checkout #payment {
      background: #fff;
    }
    
    Thread Starter jforts

    (@jforts)

    Perfect, thank you!! That’s exactly what I needed.

    Thread Starter jforts

    (@jforts)

    Thanks again for the help!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Change the background color of the WooCommerce credit card form?’ is closed to new replies.