woocommerce offtopic - Pseudo class :before don't working in a specific button

admin2025-01-08  4

Currently, i'm building an ecommerce and a small button was running with pseudo class :before suddenly stopped working.The site run WP with Divi and Woocomerce. I wish the bellow code back to run:

.woocommerce-page ul.products li.product .button.add_to_cart_button:before,
.woocommerce ul.products li.product .add_to_cart_button:before {
    color: inherit;
    Font-family:ETmodules;
    content: "\e015" !important; 
}

The only thing i did before the error was add theses CSS rules to improve Website usability:

.et-cart-info{color: #ee4b4b !important; font-weight:bold !important;}

.gfields{font-size:16px; color:#232323; text-transform: uppercase;}

.woocommerce-message[role="alert"]{color: red !important; border-color: red !important;}

This small :before must work because is a Add to cart icon. I have tested many ways and nothing work. No problems if PHP spippets are necessary.

Link to the page: Page with the problem

I want to back this icon: Example icon here

Currently, i'm building an ecommerce and a small button was running with pseudo class :before suddenly stopped working.The site run WP with Divi and Woocomerce. I wish the bellow code back to run:

.woocommerce-page ul.products li.product .button.add_to_cart_button:before,
.woocommerce ul.products li.product .add_to_cart_button:before {
    color: inherit;
    Font-family:ETmodules;
    content: "\e015" !important; 
}

The only thing i did before the error was add theses CSS rules to improve Website usability:

.et-cart-info{color: #ee4b4b !important; font-weight:bold !important;}

.gfields{font-size:16px; color:#232323; text-transform: uppercase;}

.woocommerce-message[role="alert"]{color: red !important; border-color: red !important;}

This small :before must work because is a Add to cart icon. I have tested many ways and nothing work. No problems if PHP spippets are necessary.

Link to the page: Page with the problem

I want to back this icon: Example icon here

Share Improve this question asked Sep 25, 2019 at 20:09 LucasLucas 12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

For some reason, there's a display none on the :before of your button. The following should fix this.

.woocommerce-page ul.products li.product .button.add_to_cart_button:before,
.woocommerce ul.products li.product .add_to_cart_button:before {
    display: block;
}
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736267581a1207.html

最新回复(0)