How do I give a block element with text inside of it a fixed height with '...' in the end for a responsive website?
In essence text-overflow as a CSS property doesn't get the result I need, because '...' needs to be added in the end if there is text-overflow. If there's no text-overflow, then there needs to be '...'. So if text is clipped, '...' is visible on the last line at the end of the sentence.
<article>
<h1>Title</h1>
<p>Article description</p>
<p>Read more...</p>
</article>
This is the basic layout. The actual code is posted below. It makes an article container with an image, a title, a summary and 'read more'.
The boxes are all supposed to be the same size. The title varies in the amount of lines it covers. Sometimes one line, sometimes two. The boxes are supposed to be responsive. The image is located on the left, where the top border is at the same height as the title container's top border.
<article class="article-grey">
<h4><a href="http://blog.rondevanlimburg.nl/2015/11/03/topcompetitie-vervolgstappen-2016/">Topcompetitie: Vervolgstappen 2016</a></h4>
<p>De evaluatie van de Topcompetitie 2015 was duidelijk in zijn eindrapportage… Geslaagd in zijn opzet, aanpak en uitvoering. En dát allemaal in een succesvol wielerjaar. De eerstvolgende stap is nu ...
</p><div class="thumbnail-container"><img src="http://blog.rondevanlimburg.nl/wp-content/themes/rondevanlimburg/img/logo_nieuws_gray.svg" alt="img"></div>
<span><a href="http://blog.rondevanlimburg.nl/2015/11/03/topcompetitie-vervolgstappen-2016/">Lees meer...</a></span>
</article>
#news article:nth-child(2) {/*First article different border*/
border-top-left-radius: 0em !important;
border-top-right-radius:1em;
}
/*Article color*/
.article-grey {
background:#efefef;
border-radius:1em;
margin-bottom:3em;
min-height:15em;
padding:1em 1em 1em 15em;
position:relative;
border-top-left-radius: 0em;
border-top-right-radius: 1em;
}