JSFiddle - React, Tailwind, and code Playground
by crowjonah
HTML
<script src="http://crowjonah.com/jquery.text-overflow.js"></script>
<div id="container">
<ul class="tile ">
<li><a class="list-item">Oh lord </a></li>
<li><a class="list-item">Lordy lordy i am long</a></li>
<li><a class="list-item">bigmac </a></li>
<li><a class="list-item">Oh lord </a></li>
<li><a class="list-item">Lordy lordy i am long</a></li>
<li><a class="list-item">bigmac </a></li>
<li><a class="list-item">bigmac </a></li>
<li><a class="list-item">bigmac </a></li>
<li><a class="list-item">Silly little easter-egg that, when set to true, will animate removing individual characters from the end of the element until the content fits. Defaults to false. </a></li>
</ul>
<div>
CSS
#container {
width: 600px;
height: 600px;
background-color: red;
}
.tile {
margin: 0;
padding: 0;
text-align: center;
}
.tile ul {
list-style: none;
text-align:center;
/*text-overflow: ellipsis;*/
}
.tile li {
background-color: white;
display: block;
float: left;
margin: 10px;
width: 75px;
height: 75px;
overflow: hidden;
vertical-align: middle;
text-align: center;
}
.tile li a.list-item{
display: table-cell;
vertical-align: middle;
height: 75px;
text-align: center;
width:75px;
}
JavaScript
$('li').ellipsis();