I have a example of this html :
<body>
<table>
<tr>
<td style="width:10px">
<div class="class-test">
aaaaabbbbbbbbbcccccccccccttttttt
</div>
<td>
</tr
</table
</body>
and this is my css :
.class-test {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
display:block;
}
the result is always
aaaaabbbbbbbbbcccccccccccttttttt
even I have set my td width of 10px
I have read this question : /questions/2618121/css-set-width-to-parentnodes-width
but still have the wrong result
For example, for 90px I want to see this result :
but in my real program the width of the td is change by changing the scroller zoom
my code:
https://codepen.io/eafon/pen/rLzXaq