Design comparison
SolutionDesign
Solution retrospective
what is the best way to put a design at the center of the page?
Community feedback
- @Aimal-125Posted over 1 year ago
Use display: flex; justify-content: center; align-items: center; on your main containers. For quick results: position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
0 - @mikehwebdevPosted over 1 year ago
There are a lot of ways to center a div but my favourite is:
display: grid; align-items: center; justify-content: center; min-height: 100vh;
Just another note looking at your design I think you've missed off the font family there buddy. It's listed in the style guide as:
Font
- Family: Outfit
- Weights: 400, 700
Good luck!
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