<div class="wrapper aligned">
<div class="box item1">One</div>
<div class="box item2">Two</div>
<div class="box item3">Three</div>
<div class="box item4">Four</div>
<div class="box item5">Five</div>
</div>
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
margin: 40px;
}
.wrapper {
margin: 0 0 20px 0;
width: 500px;
height: 400px;
border: 2px solid #CCC;
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(4, 80px);
grid-template-rows: repeat(3,100px);
align-content: space-between;
justify-content: space-between;
}
.box {
background-color: #444;
color: #fff;
border-radius: 5px;
padding: 20px;
font-size: 150%;
}
.item1 {
grid-column: 1 / 5;
}
.item2 {
grid-column: 1 / 3;
grid-row: 2 / 4;
}
.item3 {
grid-column: 3 / 5;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.