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

Combinator Challenge.

Okay I'm pretty sure Im doing this right and for some reason it is not looking like the challenge is letting me. But let me give this a try.

It is telling me to: Create a child selector to target the anchor element that is a direct child of the div. Set its color to green and font weight to bold. So I went ahead thinking Im uber and I know this, I entered:

.div > a { color: green; font-weight: bold; } For some reason that is wrong. So I tried with with div > a without the dot, I tried it in every shape way and form, I reviewed the video and He is using > and also the hint on the code challenge is telling me: Bummer! The child combinator is >, make sure the color is set to 'green'. So I searched the forums, and found a post and someone said to remove the sign, I did, didn't work, and I also just for the sake of trying tried < nothing works. So unless Im doing something wrong, please can someone shed some light into this? Thank you so much.

2 Answers

Nvm right after posting I tried it without the .div and just div which Im pretty sure I tried and it went through sorry for the trouble.

Yep, the problem was the dot. For future reference, the dot represents a class selector (class = "class-name-here" in your HTML) and the hash an id selector (id = "id-name-here" in your HTML)