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 trialRobin Senor
1,537 PointsChallenge 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
8,989 PointsYou have to eliminate the space after the colon, otherwise the browser will not recognize the pseudo-class selector.
Véronique Bellamy
20,810 PointsLike this. You added a bit too many spaces. :)
input[type="radio"]:checked + label {
color: blue;
font-weight: bold;
}
James Barnett
39,199 PointsAs Jessica Sideways alluded to, in CSS selectors a spaces are syntactically significant as its the combinator for a descendant selector
Véronique Bellamy
20,810 PointsIt'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
39,199 PointsThat reminds me of 3 shall be the number of the counting from the Holy Hand Grenade in Monty Python
Robin Senor
1,537 Pointsthanks y'all, and thanks for the laugh! that was indeed the problem.
Aaron A.
4,094 PointsThe video instructor should mention these significant details...
James Barnett
39,199 PointsAaron 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.
Aaron A.
4,094 PointsThanks 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
39,199 PointsI agree, understanding how combinators work is one of the most fundamental concepts in CSS.