.featured {
margin-top: 1em;
margin-bottom: 1em;
}
.featured .column {
padding-left: 0.25rem;
padding-right: 0.25rem;
}
.featured .column {
position: relative;
}
.featured .column article {
margin: 0;
padding: 0;
position: relative;
width: 100%;
}
.featured .column article header {
width: 100%;
padding: 0.5em 0;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.featured .column header h3 {
padding: 0;
margin: 0;
width: 100%;
font-size: 1.5em;
font-family: Open Sans, MundoSans, "Helvetica Neue", Arial, Helvetica, sans-serif;
font-weight: bold;
text-align: center;
z-index: 1;
}
.featured .column header h3 span {
padding: 2px;
background-color: white;
opacity: 0.8;
}
.featured .column section.post-image {
display: block;
z-index: 1;
height: 14em;
width: 100%;
overflow: hidden;
background-position: center;
}
.featured .column section.post-image img {
opacity: 0;
}
.featured .column section.post-image:after {
width: 100%;
height: 100%;
position: absolute;
content: "";
top: 0;
bottom: 0;
left: 0;
right: 0;
content: "";
z-index: 0;
display: block;
background: rgba(255, 255, 255, 0.2);
background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.8) 100%);
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(255, 255, 255, 0.2)), color-stop(100%, rgba(255, 255, 255, 0.8)));
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.8) 100%);
background: -o-linear-gradient(top, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.8) 100%);
background: -ms-linear-gradient(top, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.8) 100%);
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.8) 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ffffff', GradientType=0);
}
@media screen and (max-width: 32em) {
/* Small: any screen */
.featured .column:nth-child(n+2):nth-child(-n+10) {
display: none;
}
}
@media screen and (min-width: 32em) and (max-width: 64em) {
/* Medium: any screen 640 pixels or wider */
.featured .column:nth-child(n+4):nth-child(-n+10) {
display: none;
}
}
@media screen and (min-width: 64em) {
/* Large: any screen 1024 pixels or wider */
.featured .column:nth-child(n+5):nth-child(-n+10) {
display: none;
}
}
<link href="https://gist.githubusercontent.com/OleVik/f885e51ba3fe8a6d07e7/raw/4ad1d46ee2c1139528cc727d055be9bfe2912d41/foundation.flex.css" rel="stylesheet" />
<div class="container featured">
<div class="row align-justify">
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
<div class="small-12 medium-4 large-3 small-centered column">
<article>
<a href="#" rel="bookmark" title="Long Post Title" itemprop="url">
<section class="post-image" style="background-image: url('http://placehold.it/500x150')">
<img src="http://placehold.it/500x150" />
</section>
<header>
<h3><span>Long Post Title</span></h3>
</header>
</a>
</article>
</div>
</div>
</div>