Design comparison
Solution retrospective
Is it better to set a fixed width and height of the card rather than set it relatively to its inner content size like min-content? I didn't add media queries because it's still good in mobile screen thanks to flexbox.
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there π. Good job on completing the challenge !
I have some other suggestions about your code that might interest you.
CSS π¨:
- The width works with min-content due to the width (250px) of the image, and on small screens its component fortunately does not touch the edges. Keep in mind that using that value you will never be able to have total control over the width of the component, even so, if your component were larger and your image were equally larger, it is most advisable to use a fixed
max-width
on the component and usewidth: 100%
on your image so that it is resized.
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 helpful1 - The width works with min-content due to the width (250px) of the image, and on small screens its component fortunately does not touch the edges. Keep in mind that using that value you will never be able to have total control over the width of the component, even so, if your component were larger and your image were equally larger, it is most advisable to use a fixed
- @GulzhubPosted almost 2 years ago
Looks great. Try including a h1(level one heading) to avoid the accessibility issue. You can replace the h5 with h1 heading and then customize it as per your requirement through CSS. Always try to pass the accessibility report in your projects. Hope I was helpful. ;)
2 - @AhmedMahroussPosted almost 2 years ago
good jop my bro Congrats on completing your first challenge!ππ»If you have any questions or need further clarification, feel free to reach out to me. Happy Coding! ππ
1
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