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

luther wardle
seal-mask
.a{fill-rule:evenodd;}techdegree
luther wardle
Full Stack JavaScript Techdegree Student 18,029 Points

Won't Load fonts

I've been trying to add a font to my webpage in CSS but the dev tools give me this error

GET file:///C:/Users/l33t/Documents/digital_library/pubdombooks%C3%ABGaramond-Regular.ttf net::ERR_FILE_NOT_FOUND

here is my CSS code:

@font-face { font-family: 'EBGaramond'; src:url(C:\Users\l33t\Documents\digital_library\pubdombooks\EBGaramond-Regular.ttf); } //then I add the font family to my element body{ font-family: 'EBGaramond'; background-color: Orange; }

//can anyone tell me what i'm doing wrong? I can only think the file is in the wrong place but i'm not sure

1 Answer

Max Weir
Max Weir
14,963 Points

ABGaramond-Regular.ttf of the source and EBGaramond-Regular for the css referenced file. That stands out to me initially.