Font Awesome Icons in Offline
Solution 1:
Press the "Download free" button and make sure that you have the webfonts too. There is a web-fonts-with-css
folder in the downloaded zip. Copy the fonts in your project and modify the paths for the fonts in your CSS to point to the location of the webfonts.
If you open the CSS linked in your questions you'll see that they have some imports with
url('../fonts/fontawesome-webfont.woff2?v=4.7.0')
modify these with the location of the fonts downloaded.
Solution 2:
- Download the font awesome free zip from the official site
- there is a folder called 'css', copy that folder into your project folder, (important) and also copy the folder named 'webfonts'
- then link the desired css file to html file (all.css or fontawesome.css or fontawesome.min.css) using the command
- then try your code, it will work
Solution 3:
The Fontawesome website itself documents how to download and use the icon kit offline here: https://fontawesome.com/how-to-use/on-the-web/setup/hosting-font-awesome-yourself
Solution 4:
Here is all around solution for you:
- Download FontAwesome ZIP file
- Create an
assets
folder on yourpublic_html
(or your root folder) - Extract all the content of
font-awesome-4.7.0
into yourassets
folder - Edit your HTML file
head
tag and add the following code (i.e. after allmeta
tags):
<link rel="stylesheet" href="./assets/css/font-awesome.min.css">