Design comparison
Solution retrospective
In this challenge, I had some difficulties regarding the exact moment to use flexbox or use grid. So, when is it recommended to use each of them?
Community feedback
- @hatemhenchirPosted almost 2 years ago
Hey Luan Souza, how are you ? I really liked the result of your project:
The CSS Grid Layout and Flexbox are both layout tools that allow developers to create complex and responsive layouts for websites and applications. There are a few key differences between the two that can help determine when to use each one:
- The main difference between Grid and Flexbox is the layout direction: Grid allows you to create rows and columns, while Flexbox is primarily used for one-dimensional layouts (either in a row or a column).
- Grid is better suited for creating larger, more complex layouts with multiple rows and columns, while Flexbox is better for smaller, more simple layouts.
- Grid has more layout control and can handle both rows and columns, while Flexbox is better at handling alignment and distribution of items within a layout.
In general, if you need to create a layout with rows and columns, or if you need more precise control over the layout of your elements, Grid is the better choice. On the other hand, if you need to create a simple, one-dimensional layout and have more flexibility in aligning and distributing elements, Flexbox is a good option.
It's also worth noting that both Grid and Flexbox can be used together in the same layout, depending on your specific needs.
Great work, and happy coding.
Marked as helpful0@LuanS0Posted almost 2 years ago@hatemhenchir Thank you for your help! Now I understand better the functionalities of Grid and Flexbox!
0@hatemhenchirPosted almost 2 years ago@LuanS0 if it was helpful, please mark it as helpful. Thank you.
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord