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 trialHenry Brenton
10,144 PointsMy background will not change to orange - I've checked my code several times now, still no joy!
Hello all,
My background won't change to orange, as it does in the video - I've checked my code repeatedly, and even deleted and recreated my main.css file, but the background still won't change colour to orange.
Please could I have some help? I'm not sure what I've missed here, but everything seems to be in order codewise - I've followed the video exactly so far.
Many thanks in advance
nakalkucing
12,964 PointsHi Henry Brenton! Would you mind posting your code? I'd like to look it over and see if I can help. Best - Nakal
Alexander Bourlotos
4,009 PointsDouble check your link tag and make sure itβs not a script tag.
Also, make sure the path of the file youβre linking is the same as what youβre putting in your HTML file.
Lastly, if youβre using any other css packages like bootstrap, try making sure that your custom css is the last link in your <head> section.
If none of that works then please post your code or a link to it. Thanks
Moved this from answers to comments!
3 Answers
johannaho
4,150 PointsHi Henry,
You'd better check if there is # before the number, if you use one. Or maybe the fault isn't in that line, but the one above it. Like a ; or a } missing.
Happens to me a lot. Often as a result of copy/cut and paste. I've learned to recognise the symptoms, so I know where to look for the problem.
Good luck!
Gari Merrifield
9,597 PointsFollowing along with the video, points Nick makes 1) include the link for the style sheet in your HTML page HEAD section, be sure that you have the file named correctly, and that the path matches. If you created the file, but didn't get it moved into the css folder, it won't be found if you told it to look in there ( as Nick did in the video )
2) be sure that you have correctly selected the body, it is just "body" not ".body" or "#body"
3) you may need to force a refresh in your browser This page seems to describe most of the ways you may need to use to force it : https://www.getfilecloud.com/blog/2015/03/tech-tip-how-to-do-hard-refresh-in-browsers
Henry Brenton
10,144 PointsHey everyone - thank you for all your help!
Newbie mistake - I named my css folder 'CSS' no 'css' lol
Best Regards
Henry
nakalkucing
12,964 PointsGlad to hear you found it. :)
johannaho
4,150 PointsI'm not a newbie anymore, but I still make mistakes like that. Not so much in these courses, but I do in real life building websites. The trick is to recognise the symptoms, so you know where to look for the cause. And the best way to learn is to make many mistakes, so you remember them and their solutions next time! By now I love to make mistakes. And that was not the case when I started here. You sound much more relaxed about it. Good for you!
Good luck with your study! Johanna
KRIS NIKOLAISEN
54,971 PointsKRIS NIKOLAISEN
54,971 PointsCan you make a snapshot? Here is one where the background changes to orange:
https://w.trhou.se/oupxxpjsxv