solution to very long text (Show ellipsis for long text)

SurajRane
Posted by SurajRane under ASP.NET category on | Views : 4852
Sometimes we have very long text in <td> or in label. which cause UI look non linear. Solution for this to use <div> tag with text-overflow set to ellipsis. see code below

<div style="white-space:nowrap;overflow:hidden; position: absolute; text-overflow: ellipsis; width: 300px;height:30px">
<label> Very very very very very very very very vey longggg texttt here </label>
</div>


Here, it will only show

OUTPUT

Very very very very very very very very vey lon...

Comments or Responses

Login to post response