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 Foundations Selectors Type, Class, and ID Selectors

CSS Selectors Stage 2 Challenge 1- Select the Body & Change color

The challenge is to select the body and change the color- after the lessons on selectors. I have applied selectors (ID= and Class=) as well as tried it without, neither seem to be working! I can't figure out what I'm doing wrong!

2 Answers

Joseph Kato
Joseph Kato
35,340 Points

I'm not sure if I'm understanding your question, but if you just want to select the body, you shouldn't have to apply a selector.

It should be something like:

body {
  styles here
}

That's EXACTLY what I thought, I tried it, it's not working. :(

Yeah, I guess I'd typed something in off somehow, because that's exactly what I thought I put and when I copied and pasted yours... boom. I swear I typed all of it like, 10 times. Thank you!

Joseph Kato
Joseph Kato
35,340 Points

Hmm,

Are you on the first question? I was able to pass with this (in the style.css file):

body {
  background-color: lightblue;
}
Michael Joyce
Michael Joyce
8,253 Points

Can you post an example of your code?

I'm not entirely sure how, this is the first time I've posted on the forums.