JSFiddle - React, Tailwind, and code Playground
by bjelline
HTML
<br />
<br />
<ul>
<li class="fixed">Fixed Size</li>
<li>
this text is very very long and it goes on and on and on and on but does not wrap
</li>
<li>two</li>
<li>three</li>
<li>four</li>
</ul>
CSS
ul {
margin: 0;
padding: 0;
list-style: none;
display: table;
border-spacing: 6px 0px;
}
li {
display: table-cell;
background-color: red;
width: 150px;
}
li > div {
overflow: hidden;
text-overflow: ellipsis;
}
li > div > span {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
li.fixed {
width: 100px;
min-width: 100px;
text-align: center;
}