0

I have a problem with my icons "not showing up" on a web page, These icons are stored in the fonts folder respectively.

Below contains the snippet of my styles.css

styles.css

@font-face {
  font-family: 'FontAwesome';
  src: url('../../fonts/fontawesome-webfont.eot?v=4.1.0');
  src: url('../../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
}

My file structure

enter image description here How do I reference my files to ensure that my icons show up properly? According to the example here, http://css-tricks.com/quick-reminder-about-file-paths/ I use "../../" as this will go to resources/fonts. Am I wrong?

Any help please? Thanks!

Lawrence Wong
  • 1,129
  • 4
  • 24
  • 40

2 Answers2

0

each ../ is used to go up one directory. You are currently in the css/ directory. If you want to get to resources/fonts, you only need one ../ to get to resources, then you can enter fonts/

  • the fonts directory is at the same level as the resources directory, not a child of it – kinakuta Aug 21 '14 at 05:19
  • "I use "../../" as this will go to resources/fonts. ", so I was assuming he wanted to get into the fonts directory that IS a child of resources.(He has two fonts/ directories). – NewIsAlwaysBetter Aug 21 '14 at 05:20
0

Your CSS should be:

@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.eot?v=4.1.0');
  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
}
XIMRX
  • 2,130
  • 3
  • 29
  • 60