Reputation: 1523
This is my website: http://sonic3remastered.com/
If you look at the follow section at the bottom, you will see some codes such as /f0d4
, /f081
etc.
These are supposed to be CSS font icons, but they are displaying as codes instead of icons.
HTML
<ul class="ui-social-media color">
<li class="twitter">
<a target="_blank" href="https://twitter.com/sonic3onmobile"><span>Twitter</span></a>
</li>
<li class="facebook">
<a target="_blank" href="https://www.facebook.com/sonic3onmobile"><span>Facebook</span></a>
</li>
<li class="google-plus">
<a target="_blank" href="https://plus.google.com/103304727452387042300" rel="publisher"><span>Google Plus</span></a>
</li>
</ul>
CSS
.ui-social-media li a:before {
display: block;
font-size: 2em;
color: inherit
}
.ui-social-media li a:hover {
color: #5b5b5b
}
.ui-social-media li a span {
display: none
}
.ui-social-media .facebook a:before {
font-family: 'ui-glyphs';
display: inline-block;
width: 1em;
height: 1em;
content: "/f0d4"
}
.ui-social-media .twitter a:before {
font-family: 'ui-glyphs';
display: inline-block;
width: 1em;
height: 1em;
content: "/f081"
}
.ui-social-media .google-plus a:before {
font-family: 'ui-glyphs';
display: inline-block;
width: 1em;
height: 1em;
content: "/f0d4"
}
How can I fix this?
I have opened Chrome developer tools and gone to Network > Fonts. The font seems to be loading, so I am not sure what the issue is.
Upvotes: 0
Views: 196
Reputation: 9567
You're using forward-slash /
, when you need to be using backslash \
.
Change that, and it'll fix it.
Example
.ui-social-media .google-plus a:before {
font-family: 'ui-glyphs';
display: inline-block;
width: 1em;
height: 1em;
content: "\f0d4" /* Not "/f0d4" */
}
Upvotes: 3