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

Tom Coady
369 PointsHow do I color the background. I have followed all the steps in the tutorial?
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Coady Creative</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <style> <nav> background-color: green; </nav>
</style>
</head> <body> <header> <a href="index.html"></a> <h1><a href="index.html">CoadyCreative</a></h1> <h2><a href="index.html">Crafty Creative</a></h2> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <p>My Gallery Will Go Here</p> </section> <footer> <p>© Coady Creative.</p> <a href="http://www.twitter.com/nickrp"><img src="Img/twitter-wrap.png" alt="Twitter Logo"></a> <a href="http://www.facebook.com/tom.coady.3"><img src="Img/facebook-wrap.png" alt="Facebook Logo"></a> </footer> </body> </html>
Main.css
body { background-color: orange; }
7 Answers

Tom Coady
369 PointsIt doesn't seem to let me paste in all the code.

Andreas Anastasiades
2,916 PointsProblem is your style tag. Try and change it this way:
<style>
nav {background-color: green;}
</style>

Tom Coady
369 PointsHi Andreas
Sorry I didn't pick this up. Thank you very much for your support. That seems to have solved the problem as far as I can see.
Cheers
Tom

Michael Piercy
1,756 PointsYour html doesn't have a <body> tag. In your css, you're applying the background colour to the body element but there's none in your code. Have a look at where you think this should go and you'll find the answer. Everything else in your code looks ok.
Hope this helps.

Tom Coady
369 PointsSorry I didn't paste it in correctly. Here is all my code. What do you think?
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Coady Creative</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <style> <nav> background-color: green; </nav>
</style>
</head> <body> <header> <a href="index.html" id="logo"> <h1><a href="index.html">CoadyCreative</a></h1> <h2><a href="index.html">Crafty Creative</a></h2> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <p>My Gallery Will Go Here</p> </section> <footer> <p>© Coady Creative.</p> <a href="http://www.twitter.com/nickrp"><img src="Img/twitter-wrap.png" alt="Twitter Logo"></a> <a href="http://www.facebook.com/tom.coady.3"><img src="Img/facebook-wrap.png" alt="Facebook Logo"></a> </footer> </body> </html>

Tom Coady
369 PointsI have the body tags in my html. I will try and post the second half of my code shortly to show you.
Cheers

Tom Coady
369 PointsHi MIchael
My apologies for the lengthy delay in getting back to you. I have pasted the rest of the code in below. Could you tell me what I am doing wrong as I can't really proceed with the lessons from this point as nothing else seems to be working.
Much appreciated!
Tom
<body> <header> <a href="index.html" id="logo"> <h1><a href="index.html">CoadyCreative</a></h1> <h2><a href="index.html">Crafty Creative</a></h2> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <p>My Gallery Will Go Here</p> </section> <footer> <p>© Coady Creative.</p> <a href="http://www.twitter.com/nickrp"><img src="Img/twitter-wrap.png" alt="Twitter Logo"></a> <a href="http://www.facebook.com/tom.coady.3"><img src="Img/facebook-wrap.png" alt="Facebook Logo"></a> </footer> </body> </html>

Tom Coady
369 PointsHi Michael
Disregard last response Everything seems to be solved. Thank you again! Cheers Tom
Michael Piercy
1,756 PointsMichael Piercy
1,756 PointsEitherway, you're missing your <body> tag in your html. It should appear before your <header> tag. You are styling the background in the body element in your css and then not applying a body tag in your html.