Design comparison
Solution retrospective
Being a bit new to css i had lot of issues with the image in the div as well as making the two paragraphs look as close to the target design as possible.
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
<footer>
tag to wrap the footer of the page instead of the<div class="attribution">
. The<footer>
element contains information about the author of the page, the copyright, and other legal information.
- 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
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1 - Use the
- @HassiaiPosted almost 2 years ago
Wrap <div class="attribution"> in the footer tag and replace the first p tag <p> with <h1>to fix the accessibility issue.
Give the body the background-color you gave to *.
To center the main on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
To center the main on the page using flexbox: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
To center the main on the page using grid: body{ min-height: 100vh; display: grid; place-items: center; }
Replace the height in the main with a padding value for all the sides, this will prevent the content from overflowing on smaller screens and its a responsive replacement.
there is no need to give the img a margin value. There is no need to style .qr-image.
give h1 and p the same font-size of 15px, the same margin-left, margin-right and margin-top values. give p a margin-bottom value.
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0
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