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
Ninja Cat
597 PointsProblem with the video Fonts and Colors
I'm not sure what I've done wrong and I've spent 20 minutes trying to figure out. For some reason, the website won't express the css code. I have the link written correctly in the index, and the css is correct too.
Thanks for any help! I'm using windows and chrome
Index- relevant part:
link rel="stylesheet" href="C:\Users\Tommie\css\normalize.css" type="text/css" media="screen"> <br>
link rel="stylesheet" href="C:\Users\Tommie\css\grid.css" type="text/css" media="screen"> <br>
link href='http://fonts.googleapis.com/css?family=Nunito' rel='stylesheet' type='text/css'> <br>
link rel="stylesheet" href="C:\Users\Tommie\css\cat.css" type="text/css" media="screen">
Css: I used the code I downloaded from the website (saved as "cat"), so I know it's right
3 Answers
James Barnett
39,199 PointsI fixed it but I don't understand why it was fixed. It only works when the index I'm working on is within the same main folder as the css.
Your issue is almost certainly the file path for your CSS file. Issues with file paths are one of the most common issues for those new to HTML. Here's a quick primer on file paths that should get you going. If you still don't understand just let us know here in this thread.
Laura Hutton
5,188 PointsYou need to upload your CSS files to the internet; usually the same place your website is uploaded to. Linking to them from your hard drive won't work because the internet doesn't have access to it.
Ninja Cat
597 PointsOk, I wasn't able to complete the challenge, so maybe if someone tells me what to do there I'll understand. In the Font and Color challenge, the first one where I add a body selector, what do I explicitly do?
Laura: I'm just doing this offline as I follow the videos. That doesn't require internet uploads yet.
Edit: nvm I was able to pass the code challenge, but I still can't do it on my computer. I was wondering if there are slight variations for windows or something? Like, in the videos the guy can just link images in his index with a shorthand (img/filename), but I have to do the whole thing (C:\Users/blah/blah). So maybe this is something similar? Or what am I doing wrong?
Edit 2: Ok, I fixed it but I don't understand why it was fixed. It only works when the index I'm working on is within the same main folder as the css. Why? shouldn't me linking to the explicit address be sufficient?
thanks
Laura Hutton
5,188 PointsSorry, I read your title without thinking how it related to the post itself as neither defined it as part of a code challenge.
Now, I hate to be "that girl" but you should really watch the video again to understand why and how something works. If you need someone to explicitly tell you - which has already happened in the tutorial - then you can't expect to advance and actually know what you're doing in future. I'm sure someone else will come along and be willing to explicitly tell you but I think I'd be doing you a disservice if you weren't learning as you went.