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 CSS Foundations The Box Model Width, Height and Overflow Properties

Sebastien Sanfilippo
Sebastien Sanfilippo
2,318 Points

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

Did you have a width specified on the div?

Could you show your code?

3 Answers

I 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
Sebastien Sanfilippo
2,318 Points

mikes02 >> 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/