<div class="grid">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
.grid {
display: grid;
width: max-content;
grid-template-areas:
'a e'
'b e'
'c e';
gap: 1rem;
position: relative;
font-size: 2rem;
}
.grid > div {
width: 300px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
background: lightblue;
}
.grid > div:nth-of-type(even) {
background: green;
}
.grid > div:nth-child(1) {
grid-area: a;
}
.grid > div:nth-child(2) {
grid-area: b;
}
.grid > div:nth-child(3) {
grid-area: c;
}
.grid > div:nth-child(4) {
grid-area: d;
position: absolute;
bottom: 0;
right: 0;
}
.grid > div:nth-child(5) {
grid-area: e;
height: 100%;
background-color: orange;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.