TJBlackman
TJBlackman

Reputation: 2313

Font Awesome unicodes displaying as text

I'm trying to insert a FontAwesome icon via css using the Unicode, and my page is displaying it as text. So if the Unicode for a house icon is f015, my browser is displaying "/f015" instead of displaying a house icon.

HTML header includes:

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

CSS:

#MenuBarLink1 a:before {
      position: absolute;
      left: 1em;
      padding: 0 1px;
      font-family: FontAwesome;
      content: "/f015";
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
      -webkit-transition-duration: 0.1s;
      transition-duration: 0.1s;
      -webkit-transition-property: transform;
      transition-property: transform;
      -webkit-transition-timing-function: ease-out;
      transition-timing-function: ease-out;
    }

I'm wondering if I need to do anything to declare the font-family besides simply including that link in my HTML header. I have downloaded all the Font Awesome files, but I am only using the online link because I read that was better.

Thanks for helping a newb! :)

Upvotes: 0

Views: 2091

Answers (1)

crc442
crc442

Reputation: 627

I think you are using the wrong slash. Use,

content : '\f015';

Upvotes: 1

Related Questions