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
Post a Comment