Font awesome not working server

10,257

Solution 1

Are you declaring for UTF-8 in your document as well as in your stylesheet?

<meta charset="UTF-8">

or

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

and in stylesheet (note, must be first line, first col):

@charset "utf-8";

or

Font Awesome into your website with a single line of code. You don't even have to download or install anything!

Paste the following code into the section of your site's HTML.

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

Most likely the actual font files are not being found. If you look in the font awesome CSS file you will probably see something like:

 @font-face {
      font-family: 'FontAwesome';
      src: url('../font/fontawesome-webfont.eot');
    }

Solution 2

Add this to your web.config:

<system.webServer>
<staticContent>
  <remove fileExtension=".svg" />
  <remove fileExtension=".eot" />
  <remove fileExtension=".woff" />
  <remove fileExtension=".woff2" />
  <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
  <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
  <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
  <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
system.webServer>
Share:
10,257
Selahattin
Author by

Selahattin

Updated on June 17, 2022

Comments

  • Selahattin
    Selahattin almost 2 years

    hello awesome font style icon sets on the web site using the icons at the local level, but I look at, but the server does not appear when.

    enter image description here