<div class="container">
<ul class="cards">
<li class="card1">
<header>
<h2>Card title 1</h2>
</header>
<div class="content">
<p>Veggies es bonus vobis, proinde vos postulo essum magis. </p>
</div>
<footer>
<a href="/go-somewhere">More about card 1</a>
</footer>
</li>
<li class="card2">
<header>
<h2>Card title 2</h2>
</header>
<div class="content">
<p>Gumbo beet greens corn soko endive gumbo gourd</p>
</div>
<footer>
<a href="/go-somewhere">More about card 2</a>
</footer>
</li>
<li class="card3">
<header>
<h2>Card title 3</h2>
</header>
<div class="content">
<p>Turnip greens yarrow ricebean rutabaga endive cauliflower.</p>
</div>
<footer>
<a href="/go-somewhere">More about card 3</a>
</footer>
</li>
<li class="card4">
<header>
<h2>Card title 4</h2>
</header>
<div class="content">
<p>Lotus root water spinach fennel kombu maize bamboo shoot. </p>
</div>
<footer>
<a href="/go-somewhere">More about card 4</a>
</footer>
</li>
<li class="card5">
<header>
<h2>Card title 5</h2>
</header>
<div class="content">
<p>Brussels sprout coriander water chestnut gourd swiss chard.</p>
</div>
<footer>
<a href="/go-somewhere">More about card 5</a>
</footer>
</li>
<li class="card6">
<header>
<h2>Card title 6</h2>
</header>
<div class="content">
<p>Nori grape silver beet broccoli kombu beet greens fava bean potato quandong celery. </p>
</div>
<footer>
<a href="/go-somewhere">More about card 6</a>
</footer>
</li>
<li class="card7">
<header>
<h2>Card title 7</h2>
</header>
<div class="content">
<p>Celery quandong swiss chard. </p>
</div>
<footer>
<a href="/go-somewhere">More about card 7</a>
</footer>
</li>
<li class="card8">
<header>
<h2>Card title 8</h2>
</header>
<div class="content">
<p>Gumbo kakadu plum komatsuna black-eyed pea.</p>
</div>
<footer>
<a href="/go-somewhere">More about card 8</a>
</footer>
</li>
</ul>
</div>
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 10px;
font: 0.8em Google Sans, Segoe UI, system-ui, -apple-system, sans-serif;
background-color: #fff;
}
.container {
background-color: #ddddda;
width: 680px;
padding: 10px;
position: relative;
}
ul {
list-style-type: none;
margin: 0;
padding: 0.5em;
background-color: #fff;
display: grid;
gap: 20px;
grid-template-columns: repeat(6, minmax(0, 1fr));
grid-template-areas:
"a a b b b b"
"c c d d e e"
"f f g g h h";
}
.cards li {
background-color: #333;
color: #fff;
border-radius: 0.2em;
padding: 0.5em;
display: grid;
grid-template-rows: auto 1fr auto;
}
.cards footer {
justify-self: center;
}
.cards footer a {
display: inline-block;
padding: 0.5em;
color: #fff;
text-decoration: none;
background-color: #3740ff;
border-radius: 0.2em;
}
.cards footer a:hover,
.cards footer a:focus {
background-color: #e51661;
}
.cards h2 {
margin: 0;
}
.card1 {
grid-area: c;
}
.card2 {
grid-area: f;
}
.card3 {
grid-area: d;
}
.card4 {
grid-area: h;
}
.card5 {
grid-area: e;
}
.card6 {
grid-area: a;
}
.card7 {
grid-area: g;
}
.card8 {
grid-area: b;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.