Design comparison
SolutionDesign
Solution retrospective
- How to approach a project in the first place?
- What are HTML and CSS styling best practices?
Community feedback
- @correlucasPosted over 2 years ago
Hello Numan Iftikhar, congratulations for your solution!
I think you did it right, centering the div with display: grid.
Once in this challenge there's not a complex grid, you can use flexbox to center the div.
Just add to the main div that Wrap all the content:
div { display: flex; align-items: center; justify-content: center; }
Try it out, hope it help you!Marked as helpful0@numan-iftikharPosted over 2 years ago@correlucas Thanks for your feedback. I tried flexbox first on main div but didn't work well. I think I've to set flex-direction: colulm; to make work :)
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