Woocommerce Option Box text white on white backgro

2019-09-21 22:11发布

问题:

So I've been working on this for 2 days now and can't get my option box to change to black text.

I've tried the !important tag and even that is not overriding the white font color.

option {
color: #000 !important;}

https://www.outkastfabworx.com/checkout/ Is the the site.

The state and country select box will not display in black text unless I make the body font black, but then almost everything is black. I've tried a few things I've seen on Stack but so far none of them have allowed me to override the style.

Any help is appreciated, even point me in the direction I need to look.'

Update: Screenshot of error You do have to add an item to cart before you go to checkout so you can replicate the error.

回答1:

Option can't be styled with css. WooCommerce uses jQuery for selects.

.select2-container--default li {
  color: #444444;
}

.select2-container--default li:hover,
.select2-container--default li:focus,
.select2-container--default li:active {
  color: #fff;
}

You may have to add !important on both (example: color: #444!important;) or use greater specificity or put this CSS after all other css as long as the specificity is the same.



回答2:

¿Do you want to change the color of the text (in this case "Return to Shop" to black?.

Try this.

.button.wc-backward {
    color: black;
}

ScreenShot

If that's not what you're looking for, you need to be more specific.