Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

My main.css file doesn't seem to be effecting my webpage (i.e. the background is not changing). What have I done wrong?

During Stage 4 of the CSS section of Front End Web Design, I am supposed to change the background color of my document to orange but it doesn't seem to be working. I believe all my pathways are correct but it's obvious that I have made a mistake somewhere.

Justin Horner
Justin Horner
Treehouse Guest Teacher

Hello Jon,

If you would please post your code so we can help you identify the problem. Check your link statement in your index.html page to make sure it is correct.

Thanks

1 Answer

Christina Giannouli
Christina Giannouli
18,202 Points

Hey Jon,

the path to your css file should look like this:

    <link rel="stylesheet" href="css/main.css">

Did you double check that the main.css is inside the css folder? Have you checked if you have properly closed all html tags in your document?

To change the background of the document you should do this:

body {
   background-color: orange;
}

Is there any chance you forgot to add the semicolon at the end of your code?