I've been troubleshooting this issue for days, but I just can't seem to find a solution!
The problem lies within a table used on a webpage. If I don't specify table-layout
, I can make one cell width dynamic, but I lose the ability to set 'white-space' or 'overflow'.
On the other hand, if I use 'table-layout: fixed', the dynamic cell width is lost, but I can set 'white-space' and 'overflow' properties.
I need a solution that combines both scenarios! How can I achieve this using only CSS?
<table style="width: 50%;">
<tr>
<td style="width: 20px;">1</td>
<td style='overflow: hidden; white-space: nowrap;'>
here is a really long string to hide
</td>
<td style='width: 20px;'>3</td>
</tr>
</table>