I've been banging my head against the wall for a good hour with this stupid problem.
I'm building a website and I'm using Font Awesome. The home page of the site is located in the root (/); a page called fog.html is in /content/books/. The Font Awesome folder (font-awesome-4.6.3) is in /fonts/, so that for example FA's fonts are in /fonts/font-awesome-4.6.3/fonts/.
I reference FA's CSS from the home page like this:
<link rel="stylesheet" href="fonts/font-awesome-4.6.3/css/font-awesome.min.css">
and from fog.html like this:
<link rel="stylesheet" href="../../fonts/font-awesome-4.6.3/css/font-awesome.min.css">
because fog.html is two directories deeper than the home. I checked with the inspector and FA's CSS is properly referenced in both instances.
FA's icons are visible on the home page, but I get blank squares on fog.html. I guessed it must be because FA fonts are referenced by FA's CSS using relative paths, and since the two pages are located in different parts of the directory tree, any relative path I type in there will take me to different places depending on the page the CSS is referenced in.
So I decided I'd just use absolute paths in FA's CSS. I'm doing this on my local PC, so the edited CSS looks like this:
/*!
* Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/@font-face{font-family:'FontAwesome';src:url('file:///E:/Nicola/The%20Elynx%20Saga/Current/Documents/elynxsaga.com/Site/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.eot?v=4.6.3');src:url('file:///E:/Nicola/The%20Elynx%20Saga/Current/Documents/elynxsaga.com/Site/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'),url('file:///E:/Nicola/The%20Elynx%20Saga/Current/Documents/elynxsaga.com/Site/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'),url('file:///E:/Nicola/The%20Elynx%20Saga/Current/Documents/elynxsaga.com/Site/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'),url('file:///E:/Nicola/The%20Elynx%20Saga/Current/Documents/elynxsaga.com/Site/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'),url('file:///E:/Nicola/The%20Elynx%20Saga/Current/Documents/elynxsaga.com/Site/fonts/font-awesome-4.6.3/fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') [etc]
Regardless of all this mess, FA's icons still show on the home page, but they don't on fog.html. Clearly the absolute path can't be okay from one location and not okay from another, and since FA's CSS appears to be referenced properly on fog.html, I haven't got the foggiest clue why this happens.
Any help would be deeply appreciated!