Design comparison
SolutionDesign
Solution retrospective
I still struggle on centering my entire content even when I make a container and use grid on it
what am I doing wrong?
Community feedback
- @BenjaDotMinPosted almost 3 years ago
Hello Walid!
- Remove margin-top:50px from .container
- Add to body: display: grid; place-items: center; min-height: 100vh;
Marked as helpful1@wella4lifePosted almost 3 years ago@BenjaDotMin omg thank you so much
it actually worked and I think I know why. I didn't place a height before. you helped me a lot thank you again
1@BenjaDotMinPosted almost 3 years ago@wella4life Absolutely no problem, I fall into the same trap!
Marked as helpful0 - @misaellvzPosted almost 3 years ago
Did you try it with display : flex ? justify-content: center?
0@wella4lifePosted almost 3 years ago@misaellvz did so as well and it still wont center
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