Reputation: 773
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
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
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