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

Jim Lilly
Jim Lilly
1,933 Points

More Pseudo-classes Challenge issue

Hello,

I am taking the More Pseudo-classes challenge (third one) and it is asking: "Select the root element of the page. Set its background color to the HEX value BDD4DE." Well, I typed: :root { background-color BDD4DE;} <---- yet it says it to recheck my work and "Bummer! Check the selector in your CSS.". What am I missing here? I referenced the video (says the same thing in regards of what to put for :root) and I have checked the downloadable code. Perhaps I am overlooking something that is simple, or completely over thinking this?

4 Answers

Patrick Serrano
Patrick Serrano
13,834 Points

Your CSS Syntax is wrong. You are missing the : after the property, and the # before the color value.

Jim Lilly
Jim Lilly
1,933 Points

It was the #! Good grief, thanks, I was overlooking the # character, thanks for you help. Always something so simple. As for the : That only goes in front of the :root. The # is definitely the issue, it is fixed now. Thanks again, Patrick, for slapping me in the face. I will need to pay attention more closely.

Patrick Serrano
Patrick Serrano
13,834 Points

Jim I meant that you should have the : after background-color like so:

:root { background-color: #BDD4DE; }

Jim Lilly
Jim Lilly
1,933 Points

Hi Patrick,

Oh I had that. I typed too quickly on here, which doesn't help. I understand what you mean now. The # was my issue for sure, I seem to always forget that character. Thanks for both suggestions, I will be paying closer attention to that from now on. I appreciate your quick response, you were spot on.