I did it this way (you need to add a class text to <td>
and put the text between a <span>
:
HTML
<td class="text"><span>looooooong teeeeeeeeext</span></td>
SASS
.table td.text {
max-width: 177px;
span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
max-width: 100%;
}
}
CSS equivalent
.table td.text {
max-width: 177px;
}
.table td.text span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
max-width: 100%;
}
And it will still be mobile responsive (forget it with layout=fixed) and will keep the original behaviour.
PS: Of course 177px is a custom size (put whatever you need).