Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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');