I am looking to do the layout (image below), I want the HTML to follow the same format, as this will be pulling through dynamic content.
There are 2 rows here, the rows will then repeat to follow the design when more dynamic content is added.
I have tried using display:grid; and display:flex; but currently getting stuck on creating this correctly.
I have created this below and it works however for one row. I was wondering if there is a better way around it, or if anyone could provide any answers?
Codepen:- https://codepen.io/scottYg55/pen/VwwPqXB?&editable=true
.wrapper {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: 100px;
}
.wrapper>div {
background: blue;
border: 1px solid black;
}
.wrapper>div:nth-of-type(1) {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 1;
grid-row-end: 3;
}
.wrapper>div:nth-of-type(4) {
grid-column-start: 3;
grid-row-start: 1;
grid-row-end: 3;
background: red;
}
<div class="wrapper">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>
<div>11</div>
<div>12</div>
<div>13</div>
<div>14</div>
<div>15</div>
<div>16</div>
</div>
