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 trialMihail Petkov
8,892 PointsCss property text-overflow: ellipsis
Hello !
I am looking for a way to truncate text based on element height and width. Instead last 3 characters I want to put "..." . I tried to use text-overflow:ellipsis but It put "..." only on the first line. I want to put "..." on the second line. Is this possible ?
Thanks !
1 Answer
Steven Parker
231,261 PointsThe condition of "text-overflow" only occurs when the "white-space" property is set to "nowrap". So with these conditions, you would not have a "second line".
I'm not aware of a CSS property that will add an ellipsis based on vertical instead of horizontal overflow when text wrapping is enabled.