Design comparison
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there 👋. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML 📄:
- The
<br>
tag is not a semantic element. If a screen reader user is reading the page, they will hear "line break", which breaks the flow of the content. Instead, use CSS properties likemargin
andpadding
to add vertical space between elements.
Alt text 📷:
-
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. 📘.
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0@nuribugraPosted almost 2 years ago@MelvinAguilar Thanks for your suggestions. I will apply the changes.
0 - The
- @HassiaiPosted almost 2 years ago
There is no need to style the main and no need for a media query. There is no need for a min-height value in .card-box.
To center .card-box on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
To center .card-box on the page using flexbox: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
To center .card-box on the page using grid: body{ min-height: 100vh; display: grid; place-items: center; }
Give h1 and p a font-size 0f 15px. Give the img a max-width of 100%.
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. 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