QR-Code solution using CSS Grid and Flexbox
Design comparison
Solution retrospective
I welcome any feedback or suggestions that will help me improve my code and make the website more responsive. Thank you!
Community feedback
- @vanzasetiaPosted over 2 years ago
Hi there! 👋
The link to the GitHub repository is giving me 404. It might be because it is a private repository. So if that's the case, I recommend changing it to public.
Anyway, some feedback from me.
- I suggest using flexbox to position the card in the middle of the page. It is much more simple and less buggy code.
- After that, remove the
width
and theheight
properties. The card only needs amax-width
to prevent it from becoming too large on a wide screen. For theheight
, let the content inside it controls the height of it. - The alternative text for the image should not be a file path (
/
). It is used to describe what the image is. - I suggest making the
img
as a block element and settingmax-width: 100%
to make it easier to work withimg
element.
That's it! Happy coding! 😄
Marked as helpful0@PedroCastaneda2000Posted over 2 years ago@vanzasetia
Hi Mr. Setia,
Thank you for the feedback, the QR Code GitHub repository was set to public and should be be visible now.
Regarding Feedback:
- Centered the card using flexbox.
- Used max-width and height set to auto to let the contents manipulate the cards size.
- Gave the image a new alternative text.
- Did not implement max-width:100% but will in the future.
The QR Code website turned out really close to the original and used a lot less code after the redesign.
Thank you once again Mr. Setia for the feedback! 😄
0@vanzasetiaPosted over 2 years ago@pgc0004 No problem! 👍
Now, everyone can access the GitHub repo.
Good job with the update! However, there are some crucial things that you need to fix on the HTML.
- Alternative text should not be hyphenated (like code).
- Alternative text should not contain any words that are related to "image". The semantic of the
img
element would make the screenreader pronounce it as an image. <b>
tag is already deprecated so don't use it. Also, you don't need to wrap the text withb
tag because it's already inside theh3
which gives the text bold styling.
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