Talib Daryabi
Talib Daryabi

Reputation: 773

how can I limit the length of characters to be shown in the table td

I want to hide the extra characters in a table td if its lengths is more than 50 characters unless I click on that particular td to appear all the data

. enter image description here

ex: the above table description td has a long data in it. and I only want the first 50 characters should be shown. this should be applied for the the whole table.

Upvotes: 0

Views: 3460

Answers (1)

CODAR747
CODAR747

Reputation: 174

You can do this with css property called text-overflow . Use this property in td style, don't forget to use overflow white-space properties as well. Make sure to define max-width property to td style.

<td
  style=
"max-width:100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis">


Table Data


</td>

Upvotes: 1

Related Questions