How to wrap text till the allowed height, and then show ellipses if text overflows at the last line - CSS -


this question has answer here:

i have div -:

<div id="prep">hey jony whats up. new solar radars of great use , may evern put of wacky scientist brain strom. crazy!</div>. 

this associated css -:

#prep {     height:32px;     font-weight:bold;     overflow:hidden;     text-overflow:ellipsis;     font-family: arial, helvetica, sans-serif;     font-size:13px;     line-height:16px;     display:block; } 

clearly 2 lines of text visible. since text not fit in the div, want show ellipses @ end of last visible line of text.

you need add width, , white space.      width: 56px;     white-space: nowrap; 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -