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 CSS Basics (2014) Basic Selectors Type Selectors

CSS basic

the question is under the header set the background to orange and the text color to white. I get an error message saying make sure your setting "color to "white" . here is my code

header {
  background-color: #FFA500;
}
color: #FFFFFF;
}

I tried using just the #FFF and that didn't work either. I'm sure this is correct?

EDIT: Made the code in your post a bit more readable - Dane E. Parchment Jr. (Moderator)

1 Answer

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,075 Points

I would advise that you rewatch the videos on basic css syntax, as your current syntax is incorrect. So then let's fix it.

header {
  background-color: #FFA500;
  color: #FFF;
}

Here that should work. Your issue lay where you set up the syntax for the header, this is what the syntax for basic css looks like:

selector {
 attribute: value;
}

You can have multiple selectors like so:

selector1, selector2, selector3, selector4 {
 attribute: value;
}

And you can also have multiple attributes like so:

selector {
 attribute1: value;
 attribute2: value;
}

Hope this helps and again I advise you to go back and watch the previous videos until you have a more solid understanding of the syntax.

Thank you Dane. Ifound my mistake. I had to many closing brackets. It is 2:30AM my time and icouldnt sleep. Probably not the best yime to try doing this.

Dane Parchment
Dane Parchment
Treehouse Moderator 11,075 Points

It's ok we make those mistakes all the time :D, so long as you learn from them all is good.