cartman cartman -5 years ago 125
CSS Question

Change color conditionally Css

I'm using a third party component on my page, It has a class

where the Id changes for each post. how do I change color is
if the class contains
, is that possible?
Any help is much appreciated.


Answer Source

This works, assuming your dom element is a div .

div[class^='dialog_RechatDialog'] {
    color: yellow;  

All (div) with a class that starts (^) with string "diablo_RechatDialog"

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download