I would like to switch the 3rd and 4th column of my grid on desktop.
I know that I could assign grid-order to each item or use a own row for two of the divs and then set the order, but I would like to avoid both to reduce code.
Is there any way to achieve this with css-grid? I am open for solutions via css-flex, if that would be easier.
My current code looks like this:
.row{
display: grid;
grid-template-columns: 1fr;
}
@media screen and (min-width: 1200px) {
.row{
grid-template-columns: 1fr 1fr
}
}
.row div{border:1px solid black}
<div class="row">
<div>[IMG]</div>
<div>Text</div>
<div>[IMG]</div>
<div>Text</div>
<div>[IMG]</div>
<div>Text</div>
</div>