简体   繁体   中英

Changing text color

I have managed to change the color of other text in my woocommerce shop by using the simple custom CSS plugin for WordPress. But there is 1 text section that will not change. When you go into the shop and click on SkinCare and soaps and click the cupcake soap it says "6 in stock" which is yellow. I want to change it to black. The site is http://84f.6c5.myftpupload.com/ and my CSS for it is

.woocommerce .stock in-stock   {
  color: #000000;
}

This has got my stumped as the others changed but not this one. Thanks Linda

You need to apply the two classes simultaneously:

.woocommerce .stock.in-stock   {
  color: #000000;
}

This selected means apply the properties to an element that has both .stock and .instock as classes.

The CSS will work regardless of the order that the two classes are applied.

Applying the style in WordPress

The style you want to modify is the following:

.woocommerce div.product .stock {
    color: #1E1313;
}

which is located in the woocommerce.css file. You need to find this file, modify the current CSS rule or add the one I suggested, and then you need to upload the edited woocommerce.css file onto you hosting server. I checked your website and the style I suggested has not been added to your site.

Your CSS is wrong. in-stock is a class but you're identifying it as tag. Also, in-stock is not defined within stock . The correct implementation would be

.woocommerce .stock.in-stock   {
  color: #000000;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM