2
votes

Font Awesome worked fine when I had index.html at the root with a link to font-awesome.css

<link rel="stylesheet" href="assets/plugins/font-awesome/css/font-awesome.css">

I changed the structure of my website for having multiple languages and I now have a folder called /en for all the pages in English and a folder called /de for all pages in German. I hence have /en/index.html

When I write in the head of index.html following:

<link rel="stylesheet" href="../assets/plugins/font-awesome/css/font-awesome.css">

then I get small boxes with numbers, like f086 instead of the icon comments for example. It means, the font-awesome.css file is found but the icons do not appear.

I tried to put the folder font-awesome in en/test/ and wrote in /en/index.html:

<link rel="stylesheet" href="test/font-awesome/css/font-awesome.css">

and it works again.

Are there some restrictions in the path of the css file font-awesome.css? Is it possible to change them or are there other ways of solving that problem?

1
Are you sure you have right paths? Probably a path to CSS from a index.html file is wrong. For example "../" means one directory up and then /assets/plugins/..etc. Open source code with Firefox and click on the CSS path. If CSS file is opened then path is correct.StudioArena
There aren't any restrictions on the paths. You must be setting them incorrectly. Are you positive that the paths to the font files themselves are correct?Turnip
Yes, the path is correct but it does not work!user3035679
Ok, I've fixed the problem. I was doing something wrong with apache and php. Sorry about that.user3035679

1 Answers

0
votes

I've fixed the problem. I was doing something wrong with apache and php.

While displaying the pages on the browser, the icons did not appear, and opening them via http://localhost/en/index.html solved the problem.

Sorry, my mistake.