Вы можете использовать grid-template-areas
, если хотите сложный макет:
* {
box-sizing: border-box;
}
body {
margin: 0;
display: flex;
align-items: center;
justify-content:center;
height: 100vh;
min-height: 600px;
}
.box {
display: flex;
align-items: center;
justify-content:center;
border: 1px solid #333;
background: #444;
color: #f9f9f9;
font-size: 2rem;
font-family: Open-sans, Arial, sans-serif;
}
.container {
width: 800px;
height: 100%;
display: grid;
padding: .5rem;
grid-gap: .5rem;
/* This is where Grid is defined*/
grid-template-areas:
'box-1 box-1 box-2 box-2'
'box-1 box-1 box-2 box-2'
'box-3 box-5 box-6 box-6'
'box-4 box-5 box-6 box-6';
}
.box-1 {
grid-area: box-1;
}
.box-2 {
grid-area: box-2;
}
.box-3 {
grid-area: box-3;
}
.box-4 {
grid-area: box-4;
}
.box-5 {
grid-area: box-5;
}
.box-6 {
grid-area: box-6;
}
<div class="container">
<div class="box box-1">1</div>
<div class="box box-2">2</div>
<div class="box box-3">3</div>
<div class="box box-4">4</div>
<div class="box box-5">5</div>
<div class="box box-6">6</div>
</div>