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 trialSebastien Sanfilippo
2,318 Pointswhy text-overflow doesn't seem to work?
For curiosity's sake I added a 'text-overflow: ellipsis;' to the div after 'overflow: hidden;' but it doesn't work as I intended.
wuworkshop
3,429 PointsCould you show your code?
3 Answers
Guy Blockx
Courses Plus Student 11,439 PointsAdd 'white-space: nowrap;'
John Mutch
6,962 PointsI think I will try your text-overflow idea. Just because I am curious as to how it will look.
I am pretty sure text-overflow and overflow, in this sessions case, are two different things. One is for the text and the other is for the element. The element div trumps the content in the box model. (I think). I am going to try it. Great job Sebastien Sanfilippo for thinking outside the box.
Sebastien Sanfilippo
2,318 Pointsmikes02 >> I did specify a width Guy Blockx >> I also tried adding 'nowrap' John Mutch >> thanks John! I did some research and it seems that the 'ellipsis' only works on a single straight line. here some info: http://html5hub.com/ellipse-my-text/
mikes02
Courses Plus Student 16,968 Pointsmikes02
Courses Plus Student 16,968 PointsDid you have a width specified on the div?