Design comparison
Solution retrospective
This is my second project done here, and I'm still learning the basics. I believe I'm doing well, despite not programming yet, as I don't know JS or any other programming language. I'm still training my css and html before actually getting into JS or some other programming language.
What challenges did you encounter, and how did you overcome them?Center the div in the middle of the screen so that it takes up the entire screen.
What specific areas of your project would you like help with?If anyone can give me some tips on how to centralize the divs in a better way, I would be grateful.
Community feedback
- @danielmrz-devPosted 8 months ago
Hello, @Erick-SL!
Your project is looking fantastic!
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; }
I hope you find this helpful!
Keep up the excellent work!
Marked as helpful1@Erick-SLPosted 8 months ago@danielmrz-dev Thanks for the help, I'll look into this more. Thank you for the guidance.
1
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