Design comparison
Solution retrospective
I would like to know how optimal my code is, since I consider that there is more code. Thanks in advance.
Community feedback
- @correlucasPosted about 2 years ago
👾Hello @GuidiUZ, Congratulations on completing this challenge!
Two tips for you:
Fix the alignment. The best way make this alignment is by using
FLEXBOX
. The first step, is to addmin-height: 100vh
to make the body height size becomes 100% of the viewport height, this way you make sure the container will be aligned vertically since thebody
will display ever 100% of the screen height. After that add two flex properties to make the alignmentdisplay: 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; font-size: 15px; font-family: 'Spartan', sans-serif; font-weight: bold; display: flex; align-items: center; justify-content: center; flex-direction: column; }
You’re in the right track I can see that you’ve used the majority semantic tags possible for this challenge, the only block you’ve missed is the paragraph containing the
quote text
you can improve the accessibility there using<blockquote>
to indicate to screen readers that the content inside that paragraph is a quote.✌️ I hope this helps you and happy coding!
Marked as helpful0
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