Design comparison
Community feedback
- @iSoyecodesPosted about 2 years ago
Hello, congrats on finishing the challenge. To center your card, try setting a min-height of 100vh, then a width of 100%, and finally setting justify-content to center since the main axes would be horizontal and align-items center for vertical alignment. I've seen and read some people's codes, and while they typically place this inside a body, I believe the best practice is to place it inside a container, just like you did. Additionally, avoid adding margin to the container to center the content if you use justified content. Furthermore, play around with the gap property more; only use padding and margin when absolutely necessary.
Check out this source to learn how to use the proper CSS units, such as using em or rem in place of px in fonts because px isn't relative to anything else. The same is true for padding and margin, as well as height-vh, width-vw, and other units such as vh and vw.
link: https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units
I know I wrote plenty, but try reading. Let's help each other with our weaknesses. Please review my feedback; it is greatly appreciated.
Marked as helpful0@NJR911Posted about 2 years ago@iSoyecodes Accept my gratitude, Your feedback was really helpful.
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