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

Robin Senor
Robin Senor
1,537 Points

Challenge problem: UI Element States Pseudo Classes

Getting stuck on the second half of this challenge. Any advice is appreciated..here is what I have:

input [type="radio"]: checked + label { color: blue; font-weight: bold; } Thanks a ton!

6 Answers

Luca Sorgiacomo
Luca Sorgiacomo
8,989 Points

You have to eliminate the space after the colon, otherwise the browser will not recognize the pseudo-class selector.

Like this. You added a bit too many spaces. :)

input[type="radio"]:checked + label {
    color: blue;
    font-weight: bold;
}
James Barnett
James Barnett
39,199 Points

Robin Senor -

As Jessica Sideways alluded to, in CSS selectors a spaces are syntactically significant as its the combinator for a descendant selector

It's like that one scene in Breaking Bad where Walter freaks out on Gale.

It's 85. Not 75, not 95. 85. This is Chemistry, degrees matter.

James Barnett
James Barnett
39,199 Points

That reminds me of 3 shall be the number of the counting from the Holy Hand Grenade in Monty Python

Robin Senor
Robin Senor
1,537 Points

thanks y'all, and thanks for the laugh! that was indeed the problem.

The video instructor should mention these significant details...

James Barnett
James Barnett
39,199 Points

Aaron Andrade - The concept that spaces are syntacially significant was alluded very briefly in the Using combinators video.

To quote from the transcript at about time index 0:05

> Combinators explain the relationship between 2 or more selectors. We've actually used combinators in previous lessons when we created descendant selectors because the space between the 2 selectors is considered a combinator.

Thanks James. But I think something so significant (and on which one's success in the coding challenges depends) merits specific mention and perhaps on-screen text pop-up.

James Barnett
James Barnett
39,199 Points

I agree, understanding how combinators work is one of the most fundamental concepts in CSS.