Design comparison
Solution retrospective
Implementing grid layout for desktop view. Haven't used much of grid.
What challenges did you encounter, and how did you overcome them?Positioning the cards on desktop view.
What specific areas of your project would you like help with?Any tips on grid or responsive measurements (in your opinion what do you used the most any why? i.e. fonts, height, padding and width
Community feedback
- @FengDennyPosted 7 months ago
Hey, nicely done, but to give you some tips on responsive measurements or when should we should
Flexbox
overGrid
or vice-versa:Use Flexbox When:
-
You're working with a one-dimensional layout, either in a row or a column.
-
You want to align items within a container along a single axis (either horizontally or vertically).
-
You need to reorder items within the container.
-
You're creating a navigation bar, a sidebar, or a flexible card layout (like this project).
-
You want to evenly distribute space between items or align items with different sizes.
-
You're working with dynamic content where the number of items may change.
Use CSS Grid When:
-
You're working with a two-dimensional layout, needing to align items both horizontally and vertically.
-
You need to create complex grid-based layouts with multiple rows and columns.
-
You want to create a responsive layout that adjusts its structure based on screen size.
-
You're designing a grid-based gallery, a magazine layout, or a webpage with multiple sections.
-
You need to align items in both dimensions, and their sizes are consistent.
-
You want to control the alignment of the whole grid (e.g., centering it within the viewport).
In Summary:
Flexbox is best suited for one-dimensional layouts, such as navigation bars, flexible containers, and aligning items along a single axis.
CSS Grid is ideal for two-dimensional layouts, like complex grid-based designs, multi-column layouts, and aligning items both horizontally and vertically.
In many cases, you'll find that using a combination of Flexbox and CSS Grid provides the most flexible and efficient way to create modern layouts.
You can use Flexbox for smaller, one-dimensional layouts within larger, two-dimensional Grid layouts.
Happy
frontending
=)0 -
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