Error - Icon Font-Awesome

4

I need to add an icon to a menu, the icon I want to use is:

  

fa-file-pdf-o (PDF)

Of class:

  

font-awesome.min.css

Only one problem exists when I add the same. It appears as follows:

TheHTMLcodethatcreatesthismenuitemisbelow:

<divclass="caixa" title="Gerar PDF" id="pdf" data-toggle="modal" data-target="#pdf">
        <i class="fa fa-file-pdf-o"></i>
        <br>
        <h4>PDF</h4>
</div>

And the CSS code for these tags is as follows:

.caixa{ 
        background-color: white;
        display: inline-table;  /*o inline-block deixa na mesma linha horizontal*/ 
        position: relative;
        text-align: center;
        cursor: pointer;
        width: 5%;
        padding: 0;
        border-radius: 5%;
        border: none;
        margin-top: 1%;
        margin-right: 1%;
        float: right;
}
.fa:before{
        font-family: FontAwesome !important;
}
.caixa h4{
        font-family: century gothic;
        color: rgba(0,0,0,0.8);
        font-size: 90%;
        margin: 0;
        padding: 0;
        border: 0;
}

The error reported by the browser is this:

  

Failed to load resource: the server responded with a status of 404   (Not Found) fontawesome-webfont.ttf

     

Failed to load resource: the server responded with a status of 404   (Not Found) fontawesome-webfont.woff

My php page that requests the css file:

Thefilethatisrequestedisinsidethecssfolder:

Andthewayit'simportedintothecode...

<linkrel="stylesheet" type="text/css" href="css/font-awesome.min.css">
    
asked by anonymous 08.09.2017 / 15:14

2 answers

3

I was taking a look here and managed to find that the problem I was having, according to the error the browser reported was that it requested two files that were inside the fonts folder, which did not really exist, but he specified this in the path, so I remembered that when I downloaded that folder with the two files being requested by the browser, I then downloaded the file again and added the folder with both files and it worked! / p>

So when importing the font-awesome.min.css file you should also put the fonts folder, if in this case use the class icons.

    
08.09.2017 / 15:36
1

Try changing the way you import to:

<link rel="stylesheet" type="text/css" href="./css/font-awesome.css">
    
08.09.2017 / 15:20