2

I have a

 <span class="go"> 100,0 </span>
 <span class="go"> 0,0 </span>

And want to format this span as ITALIC only when the value is 0,0 using CSS.

How can I do that?

Walucas
  • 2,549
  • 1
  • 21
  • 44

1 Answers1

1

As Madara Uchiha already mentioned, this is not possible using only CSS.

But you could use a data attribute like <span class="go" data-value="0,0"> 0,0 </span> and query it in CSS with the attribute selector: [data-value="0,0"] { ... } (assuming you have access to the markup).

Community
  • 1
  • 1
Rudolph Gottesheim
  • 1,671
  • 1
  • 17
  • 30