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!
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

Dani Dayan
1,951 PointsCSS Selectors - Code Challenge: Basic Selectors
Hey,
I am busy trying to do the Basic Selectors code challenge (Part 1 of 5) where it asks to select the h1 and change the background color to blue.
Here is my attempt:
h1 { background-color: #ADD4DE; }
When I try submit I am told to check my h1 selector, but the preview pane shows the h1 selected and given a background color of blue.
Any ideas?
Dani
3 Answers

Dani Dayan
1,951 Points@James - Thanks for your response. Turns out I hadn't read the required correctly. It asked me to select and change the color of the h1 itself, not the background. Rookie error I guess ^_^

James Barnett
39,199 Points@Dani - Try using the color keyword blue
. As the hex value you used is a shade of blue, but not the color blue
itself.

Szu Liat Ting
3,118 Pointsdid that, the refresh is fine but code challenge says "Bummer! Check the selector in your css." Am i missing something? Thanks!
/* Complete the challenge by writing CSS below */ h1 { color: blue; }
h1 em { color: red; }

Dylan Sterbenz
Courses Plus Student 1,321 PointsI don't know what I'm doing wrong but I've tried everything you guys said and still nothing. What should I do?

James Barnett
39,199 PointsHard to say without seeing your code. Create your own thread and post your code.

Dylan Sterbenz
Courses Plus Student 1,321 PointsThe code that im using is H1 em {color:blue; }

James Barnett
39,199 PointsWhat's that em
element doing in there?

Dylan Sterbenz
Courses Plus Student 1,321 PointsThat was the last one that I tried I've gone through of code
H1 {color:blue;} was another one

Dylan Sterbenz
Courses Plus Student 1,321 PointsI found out what happened it was an unnecessary mistake. Thanks for the help though