Search code examples
cssunicodefont-awesomefont-awesome-5

Font Awesome 5.0.13 CSS error


I'm using font awesome 5.0.13 latest version but Unicode characters for font awesome not working in my css. Please let me what's the mistake.

nav.socials ul li a:before{
   font-family: 'Font Awesome\ 5 Free';
   display: inline-block;
   vertical-align: top;
   padding: 0 5px;
   content: "\f08e";
}

Solution

  • The content you tried was replaced in version 5.

    see here:https://fontawesome.com/icons/external-link-alt?style=solid

    And you have to set font-weight in Font Awesome 5

    SO here is working one:

    a::before{
       font-family: 'Font Awesome 5 Free';
       font-weight: 900;
       content: "\f35d";
      
    }
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
    
    <a href="#">try</a>