I’m looking for a way to mark when text overflows it’s container. The code goes like in this example. Basically, it’s a <span> with a set size. I want some kind of marker to show me when the text overflows.
I tried text-overflow:ellipsis;, which sounded perfect, except that it only works if the parent is the one whose size is restricted (right?).
Does anyone have any pure-CSS (JS and editing the HTML is out of the question here) ideas for how to alert me to when the text is being clipped?
Thanks!
You have to add the
white-space: nowrap;style to the container along with thetext-overflow:ellipsis;.See here
Edit Here’s some more info on it.