@MelvinAguilar
Posted
Hello there ๐. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
Alt text ๐ท:
- The
alt
attribute should not contain underscores or hyphens, it must be human readable and understandable.
- The
alt
attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.
-
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. ๐.
CSS ๐จ:
- Setting the width of the component with a percentage or a viewport unit will behave strangely on mobile devices or large screens. You should use a max-width of
320px
or20rem
to make sure that the component will have a maximum width of320px
on any device, also remove thewidth
property with a percentage value.
- A tip, instead of using flexbox and having width: 87% to center the image you could use padding on the component, this way you would create the space between the image and the component border and not repeat so much code. To give you an idea, the challenge does not require any media query, it can be made responsive for all devices just by using the necessary styles.
main > section {
/* padding: 1rem 0rem; */
background-color: var(--white);
/* width: 85vw; */
padding: 1rem;
max-width: 318px;
text-align: center;
}
div img {
width: 100%;
/* max-width: 87.5%; */
}
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding!
Marked as helpful
@Iron-Mark
Posted
@MelvinAguilar Thank you! I really appreciate your effort in making this feedback! ๐