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 trialAutumn Dlugoz
239 PointsWhy isn't my main.css file not working? It appears to be setup properly, but no changes save to site.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Autumn | Website</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head>
Am I missing something here?
7 Answers
Nikolay Nikolov
Front End Web Development Techdegree Graduate 23,576 PointsHi. Check if you have the css file in the css folder, because it seems to work if it is there.
Jason Anders
Treehouse Moderator 145,860 PointsHey Autumn. Welcome to Treehouse.
Are you refreshing the browser's page/tab where your preview is open. Saving changes in your file will not auto-update the preview in the browser.
I always close the window/tab where the preview is, so when you click on preview again, you will get a fresh and updated view.
Hope this helps. Keep Coding!
Autumn Dlugoz
239 PointsTried this many times. Still not working.
Lukas Muller
7,347 PointsHi! Is it inside of the <head></head> tag(s) ?
Autumn Dlugoz
239 PointsIt's inside of the head tags. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Autumn | Website</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head>
Autumn Dlugoz
239 PointsIt's inside of the head tags. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Autumn | Website</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head>
Scott Callaway
13,311 PointsHave you made sure that there aren't any errors within your stylesheet itself? The way that you are linking it seems to be fine... Have a look in your main.css for any bugs that could be preventing the content from being displayed properly.
Autumn Dlugoz
239 PointsI've compared it to the example quite a few times and I don't see any differences. I could be overlooking something, but I don't see any errors. From what I can tell, it looks identical to the example in the video.
Trish Collard
2,459 PointsWell, this isn't an answer, but I'm having the same problem. I tried refreshing the page and everything, but still not working. Code seems to be correct. Please help!
Nikolay Nikolov
Front End Web Development Techdegree Graduate 23,576 PointsYou have a mistake in the rel attribute. It is not ref="stylesheet" - correct is rel="stylesheet", short from relation. Cheers
Trish Collard
2,459 PointsThank you Nikolay, I see what you mean. It fixed my error! Thank you so much!
Brent Ellingson
286 PointsI am having the exact same issue. Checked and re-tried every suggestion listed here and still cannot get any changes to be made.
Nikolay Nikolov
Front End Web Development Techdegree Graduate 23,576 PointsHi Brent. Can you share you workspace so I can look better inside?
thanks
Eric Miller
2,382 PointsI'm having this same issue. My workspace is perfectly identical. File is in the right place, name is correct, syntax is good, case is consistent. Do I have a browser setting that's not fully refreshing the page or something?
Scott Callaway
13,311 PointsHi Eric,
Have you tried doing a complete refresh without cache in your browser? For instance, in Google Chrome (which I highly recommend using for the DevTools) you would use CTRL + F5 and that way, all of the content on your website would be refreshed.
Failing that, you could always just close the browser and press the "Preview" button at the top of Workspaces (if that is what you are using), in order to reload the content that you have created within the online environment.
Hope this helps!
Lukas Muller
7,347 PointsLukas Muller
7,347 PointsGood idea, might be his problem :P
Scott Callaway
13,311 PointsScott Callaway
13,311 PointsGood shout. Didn't even think of this.
Autumn Dlugoz
239 PointsAutumn Dlugoz
239 PointsIt's in there.