Ritu Singh
Problem:
I'm scratching my head on how to create this specific dynamic grid using CSS. I've been attempting it using CSS grid, but I'm curious if I should instead use Flexbox.
I'm attaching the desired adjustable layout below in a mock-up I created.
I'm attempting this in VueJS, and this is the code I have so far:
This code has gotten me most of the way, but there are minor visual issues when I have two, three, four, and five items I'd love to sort out.
Solution:
An alternative way of setting this up would be to use CSS grid-template-areas.
That way you have simple control of the layout for each number of items.
This snippet uses JS to find the number of items and CSS does the rest:
Suggested blogs:
>Disabling default ordering in the Django admin panel
>How to migrate `DateTimeField` to `DateField` in Django?
>Address the N+1 problem in Django with prefetch
>How can I retrieve all customers' bookings by their username/ID?
>How to solve Static Files not being found in Django?
>How to format date-time input in Django?