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

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -