Warum funktionieren CSS-Ellipsen in Tabellenzellen nicht?
Betrachten Sie das folgende Beispiel: (Live-Demo hier)
HTML:
<code><table> <tbody> <tr><td>Hello Stack Overflow</td></tr> </tbody> </table> </code>
CSS:
<code>td { border: 1px solid black; width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } </code>
JS:
<code>$(function() { console.log("width = " + $("td").width()); }); </code>
Die Ausgabe ist:width = 139
, und die Auslassungspunkte werden nicht angezeigt.
Was vermisse ich hier?