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 trialAdam Stevens
237 PointsCannot change the footer Colour
Hi All, I've followed the advice in previous posts, but still cannot change the footer colour. I'm sure i'm missing something obvious, please can someone help. Thank you! Adam
3 Answers
James Kim
8,475 Pointsif you can post the code that will be great, but to change the footer color is simply like this...
footer{
background-color: "color"
}
Steve Hunter
57,712 PointsYour selectors change the text color of the paragraph element in the footer - that works fine. Your text is orange.
What issue are you seeing?
Steve.
Steve Hunter
57,712 PointsYour code changes the color
property twice.
<style>
footer p {
color: green;
}
footer p {
color: orange;
}
</style>
First, you change the p
element inside the footer
to green, then to orange. This is the text colour that you're changing - and that works fine. It displays as orange as that is the last colour applied to it.
If you want the background to change, then proceed as James suggests and use the background-color
selector. But you may want to omit the p
element else you might not get exactly what you expect.
Steve.
Adam Stevens
237 PointsThanks very much for taking the time to reply Steve & James. All is fine now, I relaunched the workspace and the preview displays the footer colour.
Thanks again for your replies!
Adam
Steve Hunter
57,712 PointsNo problem! :-)
Adam Stevens
237 PointsAdam Stevens
237 Pointshttps://w.trhou.se/xn2p29mz48