ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

I don't see CSS changes only in the firefox browser.

more options

Hello, I make a website for a client via Wordpress. I used a CSS editor to replace shipping icons in the cart and checkout. I use the following code:

li:nth-child(2)>label>#wcj_shipping_icon_instance_77 {
   content: url("example.png") !important;
   height: 100%;
}

I´ve tested the changes in several browsers (chrome, opera, safari, edge) and they work everywhere, Firefox is the only one where I see the original not replaced icons.

Can anyone help me please? (Sorry for my broken english).

Hello, I make a website for a client via Wordpress. I used a CSS editor to replace shipping icons in the cart and checkout. I use the following code: <pre><nowiki>li:nth-child(2)>label>#wcj_shipping_icon_instance_77 { content: url("example.png") !important; height: 100%; }</nowiki></pre><br> I´ve tested the changes in several browsers (chrome, opera, safari, edge) and they work everywhere, Firefox is the only one where I see the original not replaced icons. Can anyone help me please? (Sorry for my broken english).

Modified by cor-el

الحل المُختار

By the way, I thought the content property could only be used in rules for ::before and ::after pseudo-elements. ??

https://developer.mozilla.org/docs/Web/CSS/content


It appears that replacing images with CSS is a not-yet-standardized feature that Firefox doesn't support yet, although some other browsers do.

Test page: https://www.jeffersonscher.com/res/img-replace/

Read this answer in context 👍 1

All Replies (2)

more options

Firefox 79+ uses more aggressive caching of external style sheets. You may need to use Ctrl+F5 or disable caching when making changes.

https://developer.mozilla.org/docs/Mozilla/Firefox/Releases/79#CSS

more options

الحل المُختار

By the way, I thought the content property could only be used in rules for ::before and ::after pseudo-elements. ??

https://developer.mozilla.org/docs/Web/CSS/content


It appears that replacing images with CSS is a not-yet-standardized feature that Firefox doesn't support yet, although some other browsers do.

Test page: https://www.jeffersonscher.com/res/img-replace/

Modified by jscher2000 - Support Volunteer