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 CSS Foundations Selectors Using Combinators in Selectors

Carson Clark
Carson Clark
2,159 Points

Create a child selector to target the anchor element that is a direct child of the div. Set its color to green and font

I'm confused as to how I should approach this particular objective.

Below is what I've done so far. http://i.gyazo.com/36d12d4f8cbfcbbd3cf2f097ae007999.png http://i.gyazo.com/72282ef90e49f4c969155209ddc9b37b.png

What's going on here?

Thanks.

1 Answer

Adam Moore
Adam Moore
21,956 Points

What you have in your code is an anchor as a direct child of a paragraph tag. You need to have the anchor element be a direct child of a div.

Carson Clark
Carson Clark
2,159 Points

Ah fixed it! Thanks so much, next time I'll read the question a little more carefully.