Using the css property content, I am trying to make an HTML object after an element.
Here is my 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 my CSS :
table{
text-align:center;
font-size:2em;
font-weight:bold;
}
td.o:after{
content:"○";
font-weight:bold;
}
td.x:after{
content:"✖"
}
Unfortunately, instead of getting the ○ character and character, I get entity names.
Fiddle
How can i fix this ? Thank!
source
share