Qr Code Component Challenge using HTML & CSS (FlexBox)
Design comparison
Solution retrospective
1.Arranging the qr box in the middle of the page
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 ๐:
- 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.
- The text
Improve Your Front-End Skills by Building Projects
is considered a heading element.
- Since this component involves scanning the QR code, the image is not a decoration, so it must have an
alt
attribute. Thealt
attribute should explain its purpose. e.g.QR code to frontendmentor.io
CSS ๐จ:
-
Setting a defined
height
for the card component is not recommended. The content should define the component height, otherwise, it will not be allowed to extend beyond your specifications.In desktop devices, your text overflows from the component: image screencapture-hanzala-bhutto-github-io-FlexBox-QR-Code-Component-FrontendMentor
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1@hanzala-bhuttoPosted almost 2 years ago@MelvinAguilar ThankYou for the feedback
Update: Followed @MelvinAguilar suggestion to let the content inside the qr-component defined the height and it worked like a charm. Content inside the component does not overflow any more.
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