Design comparison
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Juan Sebastian, Congratulations on completing this challenge!
Great solution and great start! By what I saw you’re on the right track. I’ve few suggestions to you that you can consider to add to your code:
Your component is okay but its missing the vertical alignment. The best way to do it is by using
flexbox
. First step is to addmin-height: 100vh
to make the body height size becomes 100% of the screen height, this way you make sure that whatever the situation the child element (the container) align the body and then use the flex properties for alignment withdisplay: flex
/align-items: center;
/justify-content: center;
body { min-height: 100vh; font-family: 'Outfit', sans-serif; background-color: var(--light-gray); padding: 10px; align-items: center; max-width: 370px; display: flex; justify-content: center; flex-direction: column; }
For future projects, think about using relative units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices.✌️ I hope this helps you and happy coding!
1
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