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?

<style>is not applying to the footer {} </style> when i refresh the page. what am i doing wrong?

<style> footer { color: green; } footer { color: orange;

  }


</style>

4 Answers

LaVaughn Haynes
LaVaughn Haynes
12,397 Points

I have not watched that lesson, but If footer is a class then you need to put a dot before it in your CSS.

<style>
    .footer{
        color: green;
    }
</style>
<!-- .footer class -->
<div class="footer">
    This is a footer class
</div>

otherwise you are styling a footer element

<!-- footer element -->
<footer>
    This is what you are applying style to with what you have
</footer>
Elijah Gartin
Elijah Gartin
13,182 Points

Information about HTML <footer> tag: http://www.w3schools.com/tags/tag_footer.asp

Good Answer!

Elijah Gartin
Elijah Gartin
13,182 Points

Hey John,

You appear to be missing your beginning <style> tag. Also, if you apply the same setting to the same attribute twice, you'll get the last read line. So in this case, once you fix your style tag issue your text color in the footer will be orange, not green.

Example I cooked up real quick:

<html>
<head>
  <title>Test 1</title>
  <style>
    footer{
      color: blue;
    }
  </style>
</head>

<body>
  <h1>Test Page</h1>
  <footer>
    Test Footer
  </footer>
</body>
</html>
Sacha Cohen
Sacha Cohen
5,234 Points

Another option is that you forgot to save your Workspace before you refreshed the page, I've done it a couple of times!

Badiul Alam Shufol
Badiul Alam Shufol
533 Points

Probably, you have forgotten your beginning tag. Check it!