JSFiddle - React, Tailwind, and code Playground
by bjelline
HTML
<br />
<br />
<ul>
<li class="fixed">Fixed Size</li>
<li class="ellipsed">
this text is very very long and it goes on and on and on and on and should be ellipsed
</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;
}
li.ellipsed {
overflow: hidden;
text-overflow: ellipsis;
}
li.fixed {
width: 100px;
}