-3

I'm having the following problem. Wordpress generates following code based on a String. The String accepts tag's but not " ". So I can't give it a class name or id. Now I need a specific mark-up for some cells, I defined that mark-up in a css file :

<td class="decoded_<i>1_year_warrenty</i>"> ☑ </td>

Now I need to make the color of the ☑ white. Following code works for classes without the tag

.decoded_<i>1_year_warrenty</i> {
color: white;}

Is there a method to let the browser know that it's part of the class name and not a tag.

Gommaar
  • 1
  • 2

2 Answers2

2

The class name cannot contain < or > or /. So please change the code that outputs invalid Class Name instead of making a CSS for that.

Maintaining the right HTML / CSS syntax is important than hacking the browser to work.

Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
1

You can't use these characters in a CSS class name, they're simply not valid.

See the following SO question:

Which characters are valid in CSS class names/selectors?


If wordpress is generating this then I would imagine it's a limitation of the system and that you'll need to remove some italic styling somewhere in the CMS.

Community
  • 1
  • 1
Curtis
  • 101,612
  • 66
  • 270
  • 352