JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="image">image here</div>
<div class=" ellipsis">
<div class="description">here we have a text not very long for a small module</div>
</div>
<div class="end">buttom</div>
</div>
<div class="container">
<div class="image">image here</div>
<div class=" ellipsis">
<div class="description">here we have a text not very long for a small module</div>
</div>
<div class="end">buttom</div>
</div>
<div class="container">
<div class="image">image here</div>
<div class="ellipsis">
<div class="description">and here we have a much longer text to reach the 200px "ellipsis" div to activate the effect made with pure css. a nice discovery from http://www.mobify.com/blog/multiline-ellipsis-in-pure-css/</div>
</div>
<div class="end">buttom</div>
</div>
CSS
.container {
background-color: #eee;
width:100px;
margin:20px;
float:left;
}
.image {
border:2px solid #999;
width:100px;
height:60px;
background-color: #fff;
margin-bottom:10px;
}
.end {
border:2px solid #999;
width:100px;
background-color: #fff;
}
.ellipsis {
overflow: hidden;
max-height: 200px;
line-height: 25px;
margin-bottom:10px;
position:relative;
}
.ellipsis:after {
content:"\02026";
position: absolute;
top: 200px;
right: 0px;
margin-top: -25px;
box-sizing: content-box;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
width: 20px;
margin-left: -20px;
padding-right: 5px;
text-align: right;
background-color:#eee;
}