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

Code Challenge: More Text Properties - Part 2

I'm having trouble with this code challenge. It says:

The link's container is set to hide its overflow and it's not allowing the text to wrap, so the link appears to be cut off. Select the paragraph with the class 'link' and set its text overflow to display an ellipsis.

p .link {
    text-overflow: ellipsis;
}

Surely this is what I'm being asked to do, but it tells me I'm wrong.

Guil Hernandez
Guil Hernandez
Treehouse Teacher

Hi Matthew Davies,

You're close. What you have now is a descendant selector that targets any link class that's inside a p. If you remove the space between p and .link, it will work. However, when writing a class / ID selector, you do not need to include the element type, so the class itself is the best solution.

Hope this helps.

Oh I understand now. Thanks for the help.

1 Answer

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

Reposting Guil's answer as an "answer" so that this post is marked as answered. :P

Hi Matthew Davies,

You're close. What you have now is a descendant selector that targets any link class that's inside a p. If you remove the space between p and .link, it will work. However, when writing a class / ID selector, you do not need to include the element type, so the class itself is the best solution.

Hope this helps.