JSFiddle - React, Tailwind, and code Playground
by annndrewww
HTML
<section class="story">
<div class="wrapper">
<div class="story-caption">
<h2 class="section-title">Trending stories</h2>
<a href="#!" class="section-link">View all</a>
</div>
<div class="story-cards">
<div class="story-card">
<div class="story-card-pic">
<img src="img/story-img-1.png" alt="story" class="story-card-thumb">
</div>
<div class="story-card-description">
<h4 class="story-card-title">
The many benefits of
taking a healing holiday
</h4>
<p class="story-card-desc">
‘Helaing holidays’ are on the rise
tohelp maximise your health and happines...
</p>
<a href="#!" class="story-card-link">Read more</a>
</div>
</div>
<div class="story-card">
<div class="story-card-pic">
<img src="img/story-img-2.png" alt="story" class="story-card-thumb"></div>
<div class="story-card-description">
<h4 class="story-card-title">
The many benefits of
taking a healing holiday
</h4>
<p class="story-card-desc">
‘Helaing holidays’ are on the rise
tohelp maximise your health and happines...
</p>
<a href="#!" class="story-card-link">Read more</a>
</div>
</div>
<div class="story-card">
<div class="story-card-pic">
<img src="img/story-img-3.png" alt="story" class="story-card-thumb">
</div>
<div class="story-card-description">
<h4 class="story-card-title">
The many benefits of
taking a healing holiday
</h4>
<p...
CSS
.story-caption {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
margin-bottom: 30px;
}
.story-cards {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 18px;
}
.story-card {
position: relative;
max-width: 270px;
}
.story-card-description {
position: absolute;
bottom: 0;
left: 0;
}
.story-card-title {
font-weight: bold;
font-size: 19px;
color: #000;
}
.story-card-desc {
font-weight: normal;
font-size: 15px;
color: #7D7987;
}
.story-card-link {
font-weight: 600;
font-size: 15px;
color: #FB8F1D;
text-decoration: none;
}