Responsive QR-code card ,styled with CSS .
Design comparison
Solution retrospective
The difficult part was to scale the image and made it to be responsive to mobile and desktop devices.
Community feedback
- @vanzasetiaPosted almost 2 years ago
Hello, SlavenaDuhneva! 👋
Make the
<img>
as a block element and setmax-width: 100%
. It makes the image elements responsive (not overflowing).Alternative text of the image should be used to describe the image. In this case, it is a QR code that will navigate the users to https://www.frontendmentor.io/. So, the alternative text should have that information.
Never use
px
unit for font sizes. Userem
orem
instead. Relative units such asrem
andem
can adapt when the users change the browser's font size setting.Resources about alternative text:
- Quick tip: Using alt text properly - The A11Y Project
- Avoid these common alt-text mistakes - Scope for business
- Contextually Marking up accessible images and SVGs
- Images Tutorial | Web Accessibility Initiative (WAI) | W3C
- How to write better alt-text descriptions for accessibility - Scope for business
I hope this helps. Happy coding! 😄
Marked as helpful0@SlavenaDuhnevaPosted almost 2 years ago@vanzasetia Thank you so much for your advice about the <img> tag !
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