How do I re-order GRID cells when 2 columns become 1?
More designer than programmer, I'm a bit late catching up with grids as a replacement for tables.
<div class="grid">
<div class="cell">
CONTENT 1
</div>
<div class="cell">
CONTENT 2
</div>
</div>
<style>
.grid {
width: 100%;
display: grid;
grid-template-columns: 50% 50%;
}
</style>^ Simple, easy way to establish two or more columns or rows. And if the viewport gets too narrow, a @media call establishing grid-template-columns: 100% narrows everything to a single column, by placing the first .cell above the second one. I can also play with new margins from there.
But what if I want to reverse the order of the two .cell divs when it switches to single-column, meaning I want the 2nd div appearing ABOVE the 1st? Is there an easy way for me to do this without revamping everything in flexbox (which has specific attributes for cell order)?
