Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Foundations Text, Fonts, and Lists More Text Properties: Part 2

text-overflow is a property??

Whenever I type in text-overflow as a property it doesn't hi-light... so I know its not working. I put in just 'overflow' for a property, this hi-lights it but will not change anything on the page. maybe I have my elements wrong? i'm trying to select the class link in the paragraph, so shouldn't it be: p.link {text-overflow:ellipsis;}

uggg!! I don't understand why its not working!!!

4 Answers

James Barnett
James Barnett
39,199 Points

Probably some syntax highlighting libraries haven't updated to the latest CSS3 spec. Interestingly enough text-overflow is on the list of Features at risk


Are you using Sublime text? If so, are other attributes highlighting? If not then make sure you saved the CSS file as .css and not .txt or whatever

Jose Morales-Mendizabal
Jose Morales-Mendizabal
19,175 Points

try setting "overflow:hidden;" before your text-overflow rule.

Julie (Howard) Lewis
.a{fill-rule:evenodd;}techdegree seal-36
Julie (Howard) Lewis
Front End Web Development Techdegree Graduate 25,921 Points

You've got the text-overflow right! For some reason some text editors aren't color-responsive to "text-overflow". But don't be alarmed... it should work!

Double check your selector though... remember that when you have a class named in your HTML, you don't need to specify the HTML element (in the example, the p) in the CSS, you only need to name the class (in this case, the "link" class).

Jose has an excellent point for when you get to writing your own code... generally with the text-overflow property, you want to set a width for the container you're working in and set the overflow to "hidden" so it stays inside the box you want, then add the text-overflow setting to provide the ellipsis. However, for the purposes of this code challenge, the overflow and width values are already set for you, you just need to provide the ellipsis.