Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.