<section class="grid-1">
<div class="item-1">š©š½</div>
<div class="item-2">š</div>
<div class="item-3">š</div>
<div class="item-4">š”</div>
</section>
.grid-1 {
grid-template-areas:
"š©š½ š©š½ š©š½"
"š š š"
"š” š” š”";
}
.happy-chappy {
grid-template-areas:
"- š± -"
"š š š "
"- š -"
"- š -";
}
.prince-charles {
grid-template-areas:
" . š . "
" š š š "
" . š . "
" . š . ";
}
.jackpot {
grid-template-areas:
" š š š "
" š š š "
" š š š ";
}
body {
padding-top: 20px;
background: #f5f7f8;
}
.grid-1 {
display: grid;
width: 100%;
max-width: 750px;
margin: 0 auto;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 80px 180px 80px;
grid-gap: 20px;
}
/* items */
.grid-1 div {
color: white;
font-size: 20px;
padding: 20px;
}
/* specific item styles */
.item-1 {
background: #b03532;
grid-area: š©š½ ;
}
.item-2 {
background: #33a8a5;
grid-area: š;
}
.item-3 {
background: #30997a;
grid-area: š;
}
.item-4 {
background: #6a478f;
grid-area: š” ;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.