Design comparison
Solution retrospective
This is my first front end mentor challenge. I found this one relatively simple. It's not perfect but it's very close to matching the example. Any feedback is always welcome!
Edit: Feedback was reviewed and improvements have been implemented.
Community feedback
- @atif-devPosted almost 2 years ago
Hi Ahmed, Congrats🎉 for completing the challenge. Take care about following points:
- Always check frontendmentor report generated issues after submitting the project for improvements.
- To avoid accessibility issue "All page content should be contained by landmarks" use code as :
<body> <main> ---your code here---- </main> <footer> </footer> </body>
- For centring container you can use code as:
body { min-height: 100vh; display: grid; place-content: center; }
Or you can learn centering from here.
Hope you will find this Feedback Helpful.
Marked as helpful0@AhmedAlkhPosted almost 2 years ago@atif-dev Thank you very much, Your feedback is appreciated! Very neat and simple method for centring the container!
1 - @MelvinAguilarPosted almost 2 years ago
Hi there 👋. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.
HTML:
- Use the
<main>
tag to wrap all the main content of the page instead of the<div>
tag. With this semantic element you can improve the accessibility of your page.
- You must use a level-one heading (h1) even though this is not a full-page challenge. You can create an '<h1>' element within your 'main' element that will be hidden visually but visible and readable by screen readers. The class "sr-only" hides content visually and here are the styles to copy. e.g.:
<h1 class="sr-only">QR Card Component</h1>
- The
alt
attribute should explain the purpose of the image. Uppon scanning the QR code, the user will be redirected to the frontendmentor.io website, so a betteralt
attribute would beQR code to frontendmentor.io
If you want to learn more about the
alt
attribute, you can read this article.- The <div> tag defines a division or section on a website. It is used to style a container with CSS, set special alignment, or position content. It might be more efficient to use the <p> tag; the <p> element represents paragraph-level content, usually text:
<p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p>
CSS:
- You should use the
border-box: box-sizing
property to make thewidth
andheight
properties include the padding and border of the element. This will make it easier to calculate the size of an element. You can read more about this here.
- To center correctly you must set a height to the parent component:
body { min-height: 100vh; align-items: center; . . . } .main-div { /* margin-top: 12.5rem; */ }
- You should use a CSS reset to remove the default browser styles and make your page look the same in all browsers.
Popular CSS resets:
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0@AhmedAlkhPosted almost 2 years ago@MelvinAguilar Thank you very much! I am going to implement these changes, your feedback is appreciated!
1 - Use the
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