Setting max-width
in a table cell to 250px will, paradoxically, prevent the cell (column) from getting smaller than 250px when the width of the table changes. At the same time, the maximum width does not seem to be constrained at all.
...why?
Fiddle:
See this in action: http://jsfiddle.net/cehjc8m6/1/
HTML:
<table>
<tr>
<td>Left col</td>
<td class="ell">
This is a rather long text. It should be truncateed when it
exceeds the available horizontal space.
</td>
<td>Right col</td>
</tr>
</table>
CSS:
table {
width: 500px; // change this value to see the effect
}
td {
white-space: nowrap;
}
td.ell {
overflow: hidden;
text-overflow: ellipsis;
max-width: 250px;
}