Responsive Grid
I wanted to make two different grid between mobile and desktop screens. What I want is the following:
On lg:
a b c d e
On smallest mobile:
a
b
e
c
d
Basically one full row on lg and two columns on mobile with last item on second column. I am trying grid-area
for this but it seems to jumble around on mobile.
Edit: code
Edit 2: Code is originally in chakra-ui but gist of styling is what's shown.5 Replies
Share your code
Edited post
grid-template-areas: "a e" "b e" "c e" "d e"
, maybe?What do you want to happen to columns a to d if not on the smallest device, but not on the largest either? In short – should this be fluid or is there a hard transition with media queries?
Oh, it worked with adding
e
on every row on 2nd column on the grid-template-areas
. Still not sure why it made a jumbled mess with only e
on the first row 2nd column, but thanks!