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 trialchadagate
10,302 PointsI've added the '>a' selector directly inside the 'p' selector, but it's still giving the bummer message.
I believe I have this correct, however I can't move past this point. The preview looks like it's producing the correct result. Any ideas?
C
Jordan Watson
14,738 PointsYeah thats true it should not matter if a space is added though its just incase the task passed that as correct syntax because at times I have notice the syntax checking on tasks are either strict or not.
Jordan Watson
14,738 PointsAfter checking what challenge you were referring to I discovered you do not need a direct selector the answer is below. This goes back to my point about correct syntax although your code should work it does not apply it all all anchor tags within a p tag just the direct '<a>' tag children of that '<p>' tag so if you had to have a ' p > a > a ' The anchors direct '<a>' tag child would not be red. Hope this helped! "This is if you are reffering to task 4"
p{
a{
color: red;
}
}
chadagate
10,302 PointsHere was the spot that I was having the issue with...
p {
a {
color: red;
}
> a {
color: blue;
}
}
Adding the space between > and a is what worked for me...
Seth Kroger
56,413 PointsThe weird thing is I ran the challenge myself with the exact same code and it worked just fine with or without the space between > and a.
Glad you got it working!
2 Answers
Jordan Watson
14,738 PointsTry '> a' another words a space between the direct selector and the anchor selector?
chadagate
10,302 PointsThanks Jordan, the space worked... super weird. Apologies on pasting the code, I selected the copy code to question button and it didn't, I've since moved past the lesson...
C
Jordan Watson
14,738 PointsGreat to here it works!
Seth Kroger
56,413 PointsSeth Kroger
56,413 PointsCan you show us your Sass code? It doesn't matter whether you put a space between > and a, but there's probably something else not quite right.