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

Stylesheets don't load

I am new to CSS and this this problem is pretty strange. My stylesheets don't load, although my path is definitely correct. They used to work, but for some reason stopped. I installed GitHub, loaded my project there and this was the end of my stylesheets working. I have been learning CSS and HTML for the past month so I couldn't find any answer to this question as all of them involved more complicated things. On my desktop I have a few separate folders with projects do you think it might be a problem .

<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Beata Gozdziaszeks Profile</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/styles.css"> <link href='https://fonts.googleapis.com/css?family=Lobster&Source+Sans+Pro:400,300italic' rel='stylesheet' type='text/css'></head>

Simon Coates
Simon Coates
28,694 Points

I assume you mean by not loading, that it's not showing up when reloading the page with the developer tools network tab open. I tried your code, and it works fine. So the only things that occur are the css path is messed up, or your .css file looks like it isn't being applied (is malformed, so looks at a glance like it isn't loading.).

3 Answers

Thank you guys. Thanks for your answers. I feel so stupid. My path was messed up. I thought there was something wrong with my browsers:IE, Chrome, Firefox. Next time I will try harder no find a mistake, instead of posting a silly problem like that.

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Beata Gozdziaszek you absolutely should not feel stupid! We all make typos. It happens. Oh and by the way, the best way to learn any type of programming/coding is by breaking it and then fixing it! Which you did :smiley: Just hang in there!

Simon Coates
Simon Coates
28,694 Points

It's fine. I make mistakes often enough to have a document entitled "mistakes i make". (The top of the list is accidentally redeclaring variables by including type using copy-paste.). And knowing how to debug and isolate mistakes isn't a skill you develop by having your code run perfectly every time.

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! You say that you are sure the paths are correct. And I've heard others say this before. Are you sure that the capitalization in your files are correct? Windows tends to not be picky about capitalization in path names. This is not true for any Linux-based system. So main.css is not the same file as Main.css. And the folder javascript is not the same folder as JavaScript. Also, have you tried clearing your browser cache and reloading the page?

This is going to be difficult to troubleshoot without actually seeing your filesystem and code, but I hope this helps! :sparkles:

Thanks Jennifer for kind words. :) I just remembered that I had a copy of my project on GitHub, in this way I could compare my broken code with the one that works.