I have created a CSS grid with this specification:
I have two columns, each has a width of 50%.
.section-grid {
display: grid;
grid-template-rows: 1fr;
grid-template-columns: 50% 50%;
}
<div class="section-grid">
<div>One</div>
<div>Two</div>
<div>Three</div>
<div>Four</div>
</div>
How can I change the ordering with CSS grid so that divs three and four are displayed as if they have been changed? I will use it dynamically as I see two divs are one row and every second row should be changed.
I've created a pen for this: https://codepen.io/anon/pen/mpwKEw
And I would like to have the same markup as above, but it should be displayed as:
One | Two
Four | Three
Five | Six
Eight | Seven