Design comparison
Solution retrospective
Hello Everyone! This is my very first challenge in Front End Mentor. You may laugh, but I worked hard to get this QR code done.
I would really appreciate any feedback. I am sure there's things I can improve, or make in a different (maybe more efficient) ways.
Thank you very much in advance!
Community feedback
- @sophiakoulenPosted over 2 years ago
The code looks very nice to me!
I'm not sure about using <h3> for the text, since you haven't used any <h1> or <h2> on the page and you shouldn't use tags that have a meaning for decorational purposes instead of adding extra css.
And the margin: -50% doesn't seem to have any effect.
You don't necessarily need to put your <img> inside a <div>. The <img> has by default a display value of inline, so it won't respond to width or height properties, but you can change that behaviour with 'display: block;' so it will act just like a <div>.
The combination of absolute position and translation seems quite nice to me, i will definitely keep that in mind as a way to center an element. An alternative way, if your body has only one child, is to give 'height:100vh', 'display:grid', 'place-items:center' and the child is centered!
0@lnaranjocPosted over 2 years ago@sophiakoulen Thank you! I will keep in mind your advice :)
0 - @Li-BeePosted over 2 years ago
Well done - close to the design. To fix the accessibility issues you need to add a <main></main> landmark
<main> <div class="container"> .... </div> </main>
0@lnaranjocPosted over 2 years ago@Li-Bee Thank you very much for your feedback. I am looking into landmark elements now, as I had never used them before (these are my first months of web developing). I will correct the code in the repository, and will take it into account for the future. Thank you very much.
0@Li-BeePosted over 2 years ago@lnaranjoc same here! I only realised they were a thing a couple of weeks ago. 😁
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