Design comparison
Solution retrospective
Please, I need you guys to comment my flaws and things i ought to do. Thanks
Community feedback
- @correlucasPosted about 2 years ago
👾Hello @bukeme, Congratulations on completing this challenge!
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:
1.The approach you've used to center this card vertically is not the best way, because using
position relative
you don't have much control over the component when it scales. My suggestion is that you do this alignment withflexbox
using the body as a reference for the container.The first thing you need to do is to remove the margins used to align it, then applymin-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 withdisplay: flex
andalign-items: center
/justify-items: 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%); min-height: 600px; /* position: relative; */ display: flex; align-items: center; justify-content: center; }
2.Replace the
<h3>
containing the main title with<h1>
note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level.3.Use relative units like
rem or em
instead ofpx
to have a better performance when your page content resizes on different screens and devices.REM
andEM
does not just apply to font size, but all sizes as well. To save your time you can code your whole page usingpx
and then in the end use a VsCode plugin calledpx to rem
to do the automatic conversion or use this website https://pixelsconverter.com/px-to-rem✌️ I hope this helps you and happy coding!
0 - @SamadeenPosted over 2 years ago
Hey!! Cheers 🥂 on completing this challenge.. .
Here are my suggestions..
- You should use <main class="card"> instead of <div class="card">.
- Go down orderly when you are using the headings h1 down to h2 down to h3 and so on.
- You should add a
lang
attribute to yourhtml
tag
This should fix most of your accessibility issues
. Regardless you did amazing... hope you find this useful... Happy coding!!!
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