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

HTML How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

My background color is not changing to orange.

I have checked the syntax. My main.css file is inside css folder, and I have also properly included it in the index.html file. But, still it isn't working. Here're the codes: Index.html code which is inside header tag: <link rel="stylesheet" href="css/main.css"> main.css code: body { background-color: orange; }

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

Hi there! Before we troubleshoot this further let's check some basics. Are you positive you saved your file? If so, try launching the preview again and refreshing the page. If this doesn't work, try clearing your browser cache or launching it in a private tab and refresh the page. If none of these work we're likely going to need to see a snapshot so we can assist you further! :sparkles:

edited for additional note

You say your link is inside the header tag. It should be inside the <head> tag. Note that <header> and <head> are not the same.

2 Answers

Steven Parker
Steven Parker
231,198 Points

Check your file organization.

In addition to Jennifer's suggestions, you might want to check how your files are organized. Your link tag indicates that your CSS file is named main.css and located in a subfolder named "css". If you have the file in the same folder as your HTML, then it would not be recognized and loaded.

Actually, it might be a server issue. I've fixed it now.

I actually moved the main.css file out from the css folder, then placed it back, and now it's working fine.

Thanks