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

CSS How to Make a Website CSS: Cascading Style Sheets What is CSS?

Why do I need to insert a "p" in the CSS rule, when the instructor simply uses "footer?"

I've read several of the threads on this here, but no one seems to be bothered by this - the only way I can get the footer text to change to either green or orange is to add a "p" (indicating the paragraph tag in the footer) after "footer" in the CSS rule.

The instructor's code, however, doesn't do this. He just uses "footer" and that does the trick. Am I doing something wrong?

4 Answers

Joao Pedro Portela G. Vaz
Joao Pedro Portela G. Vaz
4,507 Points

You forgot to close the "a" tag of facebook, therefore the "2014 Nick Pettit" is using "a" style. Try closing the "a" tag before "Ā© 2014 Nick Pettit."

MOD note: Moved from comment to answer so it may be up-voted and/or marked as "Best Answer"

Joao Pedro Portela G. Vaz
Joao Pedro Portela G. Vaz
4,507 Points

Hi Lou Kotsinis,

Could you please share your code? You can change the color of the text directly on the footer tag on css. Take a look at this: https://gist.github.com/porthunt/a8128d24514bc587fb96

Did you include the "color: " on your footer tag?

Thank you, Jao. Here you go. You'll see that I have inserted the "p" after "footer" in the rule. This is the only way I can get the footer text to change. In the instructor's video, he did not do this. He just kept "footer" and that alone was enough to change the color of the text. Thanks:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <style> footer { color: green; } footer p { color: orange; } </style> </head> <body> <header> <a href="index.html"> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> <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> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Playing with blending modes in Photoshop.</p> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Trying to create an 80's style of glows.</p> </a> </li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Drips created using Photoshop brushes.</p> </a> </li> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Creating shapes using repetition.</p> </a> </li> </ul> </section> <footer> <a href="http://www.twitter.com/lkotsinis"> <img src="img/twitter-wrap.png" alt="Twitter logo"> </a> <a href="http://www.facebook.com/lkotsinis"> <img src="img/facebook-wrap.png" alt="Facebook logo"> <p>Ā© 2014 Nick Pettit.</p> </footer> </body> </html>

Sorry - "Joao"

That did it. Rookie mistake. Thanks so much.