I have an <li>
that when hovered is supposed to change a number into a unicode icon, for example a play button.
The unicodes keep popping up an icon that looks like this: [?]
I'm assuming it can't find them. I am using font icons in other parts just fine, any ideas?
<ul class="popular-songs">
<li>
<div class="album-cover"><img src="http://newnoisemagazine.com/wp-content/uploads/2014/04/Expire-Pretty-Low-cover.jpg"></div>
<span class="number">
<span>1</span>
</span>
<span>+</span>
<span class="title">Pretty Low</span>
<span class="misc"><i class="fa fa-ellipsis-h"></i></span>
<span class="total-plays">163,957</span></li>
</ul>
CSS:
.popular-songs li .number{
position: relative;
content: '1';
top:0px;
}
.popular-songs li:hover .number span{
display: none;
}
.popular-songs li:hover .number:after{
content: "\f04b";
position:relative;
top:15px;
}
I have tried writing the unicode in every possible way I could think of.
content: "/XXXX";
content: "\XXXX";
content: "XXXX";
content: "[XXXX]";
None of them seem to work for me.
font-family
in your css, are you setting the font tofont-family: 'FontAwesome';
?