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 trialRyan Petchenick
11,439 PointsColor of Footer text won't change to green
The color of my footer text won't change to green.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ryan Petchenick | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<style>
footer {
color: green;
}
</style>
Adam Sackfield
Courses Plus Student 19,663 PointsYou have no opening "style" tag.
2 Answers
Neil Anuskiewicz
11,007 PointsActually, maybe that is enough code if it's a class, I think you need a .footer right? Worth a try.
edeharrison
Full Stack JavaScript Techdegree Student 11,127 PointsHi Ryan,
Yes, it would be useful to see more of your code, especially the HTML of the footer.
One suggestion, try targeting the specific text element. For example, if it's a <p> tag, something like:
footer p {
color: green;
}
This way, you're targeting the element a little more specifically.
All the best,
Ede
Neil Anuskiewicz
11,007 PointsEde, oops, did I give bad advice with the suggestion of a .footer for class?
edeharrison
Full Stack JavaScript Techdegree Student 11,127 PointsHi Neil,
Not at all :) If it's a class named 'footer', then you would target it as:
.footer
I've just noticed that Adam has spotted the mistake though. There's no opening 'style' tag.
Ryan, your full code should be:
<meta charset="utf-8">
<title>Ryan Petchenick | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<style>
footer {
color: green;
}
</style>
Ede
Neil Anuskiewicz
11,007 Pointsede, it's actually targeting the footer element not a class. That was my mis guided thinking. Thank you. So, as you noted, the correct answer is this:
<style>
footer p {
color: green;
}
</style>
Neil Anuskiewicz
11,007 PointsNeil Anuskiewicz
11,007 PointsI think it would be easier to troubleshoot if you posted more of the code. i don't see the opening style tag and I don't see footer html with that you're targeting. Is it a class as in .footer or something as you just footer no . in front of it.