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 Sass Basics (retired) Getting Started with Sass Advanced Nesting

I'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

Seth Kroger
Seth Kroger
56,413 Points

Can 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.

Jordan Watson
Jordan Watson
14,738 Points

Yeah 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
Jordan Watson
14,738 Points

After 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;
 }
}

Here 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
Seth Kroger
56,413 Points

The 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
Jordan Watson
14,738 Points

Try '> a' another words a space between the direct selector and the anchor selector?

Thanks 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
Jordan Watson
14,738 Points

Great to here it works!