divs
スタイル付きのものもいくつかあるので、固定幅を設定し、収まらない場合は内部のテキストを切り捨てたいdisplay: table-cell
と思います。divs
html
<div class="row">
<div class="cell" style="width:100px;">Should not fit in 100px</div>
</div>
CS
.row {
display: table-row;
}
.cell {
display: table-cell;
border: solid 1px #DADADA;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
出来ますか?
ベストアンサー1
代わりに以下を設定できますmax-width
:
<div class="cell" style="max-width:100px;">Should not fit in 100px</div>