CSS put html entity as content -


this question has answer here:

using css content property, trying make put html entity after element.

here html:

<table id="tic" cellpadding="0" cellspacing="0" border="5" bordercolor="black" bordercolorlight="gray" bgcolor="white">     <tr>         <td width="55" height="55" class="x"></td>         <td width="55" height="55" class="o"></td>         <td width="55" height="55" class="x"></td>     </tr>     <tr>         <td width="55" height="55" class="o"></td>         <td width="55" height="55" class="x"></td>         <td width="55" height="55" class="o"></td>     </tr>     <tr>         <td width="55" height="55" class="x"></td>         <td width="55" height="55" class="o"></td>         <td width="55" height="55" class="x"></td>     </tr> </table> 

and css:

table{     text-align:center;     font-size:2em;     font-weight:bold; } td.o:after{     content:"&#9675;";     font-weight:bold; } td.x:after{     content:"&#x2716;" } 

unfortunately, instead of getting ○ character , ✖ character, entity names.

fiddle

how can fix this? thanks!

css isn't html. can't use html entities in it.

use literal character () or css unicode escape instead.


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -