Design comparison
Solution retrospective
Clean code and JavaScript
What challenges did you encounter, and how did you overcome them?JavaScript
What specific areas of your project would you like help with?JavaScript
Community feedback
- @danielmrz-devPosted 7 months ago
Hello, @Omer-KISAKOL!
Your project is looking good!
I'd like to suggest a way to make it even better:
- Your project is not completely centered.
Here's a highly efficient approach to position an element at the center of the page both vertically and horizontally:
📌 Apply this CSS to the body (avoid using
position
ormargins
in order to work correctly):body { min-height: 100vh; display: flex; justify-content: center; align-items: center; }
- Also, you could've wrapped the whole thing with
<main>
and tried using grid to place the elements correctly. Using flex is not the best for this case.
When you find yourself questioning about using flex or grid, consider this:
📌 Use flexbox when you need a one-dimensional layout (either in a row or a column), such as navigation menus or arranging items within a container.
📌Use CSS grid when you need a two-dimensional layout with rows and columns, like organizing content in a grid-like structure or creating complex layouts.
In simple terms, use flexbox for simpler, linear layouts and CSS grid for more complex, grid-based layouts.
I hope you find this helpful!
Keep up the excellent work!
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