help suggestion
I want to recreate this using flex as a practice. Will flexbox work with this layout or i shall use grid?
5 Replies
Use flex when aligning items in a single direction (row or column) or when the size depends on content. Use grid for more complex, two-dimensional layouts with precise control over rows and columns.
I use both🤣
personall would use grid for this
I would actually consider using columns. The reason being the different length of the blocks.
I don't think that you could achieve the with flex alone and with grids, whilst possible be defining the number of rows for each block, I would think that it would be overly complicated for something that columns can do natively.
A (responsive) demo using columns:
https://codepen.io/cbolson/pen/vYoKPLY
You can make any layout using Flexbox, but for some particular layouts like this one, Grid seems to be a good choice.
thank you guys
:thanks: