Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fa-user-circle-o not working

I want to show user circle icon, I have download a font-awesome css file with version 4.7.0. But this is not working for me. If I use cdn then its working. I am not getting what is the issue in downloaded file. Here my code:

<html>
    <head>
        <link href="font-awesome.min.css" rel="stylesheet" type="text/css">
    </head>
    <body>
        <i class="fa fa-user-circle-o"></i>
    </body>
</html>

Does anyone know what is the issue?

like image 474
Diksha Avatar asked Dec 13 '17 08:12

Diksha


2 Answers

There is no problem with body part of HTML. Surely, it has to be with font-awesome.min.css or its path.

There are two ways to go about this problem:

  1. font-awesome.min.css may not loaded along with your HTML. Check in network tab of chrome DevTools. The path you have provided indicates chrome to look for the CSS file in same directory as the HTML file.

  2. Alternatively, you can provide cdn link for font-awesome.min.css, if you dont want to maintain the CSS by yourself. For this, change link tab in head to below:

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
like image 198
vishwarajanand Avatar answered Nov 15 '22 11:11

vishwarajanand


You have to host the font files too. Go to the fontawesome website and read the related documentation. Font awesome get started

like image 2
Mahdi Bavi Avatar answered Nov 15 '22 10:11

Mahdi Bavi