help suggestion

I want to recreate this using flex as a practice. Will flexbox work with this layout or i shall use grid?
No description
5 Replies
sebin
sebin•3mo ago
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🤣
clevermissfox
clevermissfox•3mo ago
personall would use grid for this
Chris Bolson
Chris Bolson•3mo ago
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
Code-S â™›
Code-S ♛•3mo ago
You can make any layout using Flexbox, but for some particular layouts like this one, Grid seems to be a good choice.
n4ut1lu5.
n4ut1lu5.OP•3mo ago
thank you guys :thanks:
Want results from more Discord servers?
Add your server