I am trying to understand how to achieve a layout that takes two columns in the first row and three columns in the second row, third row, and so on.
<section>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
</section>
//CSS
section {
display: grid;
grid-template-columns: 1fr 1fr;
}
The above code will give me two-column layout but how to modify it to achieve mentioned layout.