I play with CSS grids.
When I browse it to the desktop size (min-width: 769px), I have one row with three columns - something like this:
---------------------------------------------
| col 1 | col 2 | col 3 |
| | | |
---------------------------------------------
Is it possible using css-grid to move columns so that I can do something like this on a mobile layout:
---------------------------------------------
| col 1 | col 3 |
| | |
---------------------------------------------
| col 2 |
---------------------------------------------
I know that I span cells with something like this:
.content{
grid-column: 1 / span2;
}
But I want to reorder the columns. Can I do this without a preliminary processor?
Here is my current grid class:
.my-grid {
display:grid;
grid-template-columns: 15% 1fr 25% ;
grid-template-rows: 1fr;
grid-gap: 10px;
border: 2px solid #222;
box-sizing: border-box;
}
source
share