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?

David Miller
David Miller
3,526 Points

The background of my font in "nav a" has turned orange just like in the video; however, the text has remained blue. ??

code is identical to instructors

4 Answers

Hi David,

That's right, CSS doesn't use that form of commenting.

CSS uses the following format for comments: /* put comment here */

Comments in CSS begin with /* and end with */

for instance,

/* This line is commented out. */

David Miller
David Miller
3,526 Points

I just rewrote it and figured out the problem was a comment I made. Care to clarify why?

Here is the code that works:

<style>
      nav a {
        color: white;
        background-color: orange;
      }
</style>

Here is the code that will only change the background-color:

<style>
      nav a { <!-- style -->
        color: white;
        background-color: orange;
      }
</style>

**I assume the problem is that CSS doesn't use the same commenting technique as HTML and is commenting out the first property...

It won't be. Post your code up here.