私は自分の td に次のコードを試しましたが、良い兆候はありません。
.td_class{
max-width:100px;
overflow: hidden;
text-overflow : ellipsis;
-ms-text-overflow : ellipsis;
}
助けはありますか?
これを試して、
td
{
max-width: 100px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
<th>
追加の要素でテキストをラップし、それに and を適用するwidth
と、機能overflow
します。
http://jsfiddle.net/nkLav9f7/6/
<table>
<thead>
<tr>
<th><span>This is a really long header</span></th>
</tr>
</thead>
<tbody>
<tr>
<td>foo</td>
</tr>
</tbody>
</table>
table, td { border: solid 1px black }
th
{
max-width: 50px;
}
span
{
overflow: hidden;
display: block;
width: 50px;
white-space: nowrap;
text-overflow: ellipsis;
}