T
T
tarabukinivan2018-04-04 19:30:15
Bootstrap
tarabukinivan, 2018-04-04 19:30:15

How to trim long words inside a table?

Good evening!
Using bootstrap 3.3.7
Made a simple table

<table class="table">
<thead>
<tr>
    <th width="30%"></th>
    <th width="40%"></th>
    <th width="30%"></th>
</tr>
<thead>
<tbody>
<tr>
<td>ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss</td>
<td>dddddddddddddddddddddddddddddddddddddddddddddddddddd</td>
<td>jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj</td>
</tr>
</tbody>
</table>

If the words are very long, then the table expands. How to make if the words are longer than the width of the column, then they are cut off?
In simple md I use the class:
.clip {
    white-space: normal; /* Запрещаем перенос строк */
    overflow: hidden; /* Обрезаем все, что не помещается в область */
    text-overflow: ellipsis; /* Добавляем многоточие */
 }

But they don't work inside td

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Senseich, 2018-04-04
@tarabukinivan

https://jsfiddle.net/85v8sohe/5/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question