Design comparison
SolutionDesign
Solution retrospective
I would love to know the better way to fit a div to the center of the screen.
Community feedback
- @rsrclabPosted almost 3 years ago
Hi, @CMconsults ~
Congratulate on your solution to the challenge on FM platform. I have studied your work carefully and learned a lot from it.
Here are some of the tips I like to provide.
- On smaller devices, card goes over screen, and I think
max-width: 100%
can solve this issue. - Please try BEM for naming element classes. It will help you a lot on bigger projects.
- This can make card element to get centered.
body { margin: 0; height: 100vh; display: flex; align-items: center; justify-content: center; }
If it can help you even a bit, it would be happy to me.
Cheers ~
Marked as helpful0@CMconsultsPosted almost 3 years ago@tymren608 Thanks a lot. I didn't know I can do it that way before. I've really learned something.
0@CMconsultsPosted almost 3 years ago@tymren608 Thanks a lot. I didn't know I can do it that way before. I've really learned something.
0 - On smaller devices, card goes over screen, and I think
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