Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Basics (2014) Enhancing the Design With CSS Web Fonts with @font-face

Bradley Craig
Bradley Craig
1,847 Points

Font Links not recognized

Hello, I am having a pretty unique issue regarding the font links for your custom web fonts discussed in this video. Basically, the Visual Studio Code program I am using won't recognize the links as proper, usable web links. Inserting them in my stylesheet will instead cause multiple folders to be affected. I will show you an image of what is going on. Hopefully you can help me find a solution

Bradley Craig
Bradley Craig
1,847 Points

Also, I cannot figure out how to add a screenshot image to the discussion. So I will copy and paste the lines that are affected instead. Hopefully that works src: url('../fonts/abolition-regular-webfont.eot'); src: url('../fonts/abolition-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/abolition-regular-webfont.woff') format('woff'), url('../fonts/abolition-regular-webfont.ttf') format('truetype');

1 Answer

giraffekey
giraffekey
11,650 Points

Specify the language on the first line of the code when using the backticks so that it looks like this:

src: url('../fonts/abolition-regular-webfont.eot'); 
src: url('../fonts/abolition-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/abolition-regular-webfont.woff') format('woff'), url('../fonts/abolition-regular-webfont.ttf') format('truetype');