Design comparison
SolutionDesign
Solution retrospective
I wanted to place the div at center of the page. Please how to do that? Thanks
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hi @Richiemore ๐, good job completing this challenge, and welcome to the Frontend Mentor Community! ๐
- There are two modern CSS techniques to center elements:
Using flexbox layout:
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
Using grid layout:
body { margin: 0; min-height: 100vh; display: grid; place-content: center; }
Links with more information:
- The Complete Guide to Centering in CSS.
- A Complete Guide to Flexbox (CSS-Tricks).
- How TO - Center Elements Vertically (W3Schools).
- CSS Layout - Horizontal & Vertical Align (W3Schools).
Good job, and happy coding! ๐
0@RichiemorePosted almost 2 years ago@MelvinAguilar Thank you so much for your guide. i will look into those materials. am really glad.
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