cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using conditional operators in CSS

Former Member
1,254

Hi All,

1. How can we write 'Not equal to' in CSS? I want to put a condition where:-

if 'User Status' is NOT EQUAL TO ( ASIG or USAB ) ? I have tried this, but it gives an error.

tr[data-mydata != "ASIG"]{ background: #ff3333!important }

Regards

Meenakshi

View Entire Topic
pfefferf
Active Contributor

Use the :not selector.

tr:not(tr[data-mydata="ASIG"]) {
  background: #ff3333 !important;
}