Design comparison
Community feedback
- @correlucasPosted about 2 years ago
๐พHi @Alfo-code, congratulations on your first solution!๐ Welcome to the Frontend Mentor Coding Community!
Great solution and a great start! From what I saw youโre on the right track. Iโve few suggestions for you that you can consider adding to your code:
Your component is okay but it's missing the vertical alignment. The best way to do it is by using
flexbox
. The 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) aligns the body and then use the flex properties for alignment withdisplay: flex
/align-items: center;
/justify-content: center;
. If you're using the attribution you need to addflex-direction: column
to make the attribution stays under the QR Code component. See the code below:body { min-height: 100vh; background-color: hsl(212, 45%, 89%); font-family: 'Outfit', sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; }
โ๏ธ I hope this helps you and happy coding!
Marked as helpful0 - @pradeep0712Posted about 2 years ago
you have done a good job bro.....try improving it further
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