When I have ellipsis
on the long word, it breaks id:
and the [ ]
onto different lines. I can't seem to keep it all together one one line. I've tried white-space: nowrap
and display: inline-block
. Any ideas?
https://jsfiddle.net/b35m449x/4/
HTML
<div class="container">id: [<div class="trunc">userrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr</div>]</div>
CSS
.container {
display: inline-block;
white-space: nowrap;
border: 1px solid black;
width: 100%;
}
.trunc {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
white-space: nowrap;
}