My qr component code

Solution retrospective
i'll love to have a review, smiles ;)
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Hassiai
Replace <div class="scan-area">with the main tag, <p class="text-area-1"> with <h1> and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
There is no need to give .scan/ the body a max-width and padding values.
To center .scan-area on the page using flexbox, add min-height: 100vh to the body.
There is no need to give .scan-area a height value, give the padding the same value for all the sides
padding: 16px
.Give .text-area a margin value for all the sides, text-align: center and a font-size of 15px which is 0.9375rem, this will be the font-size of both p and h1. give p a margin-top value or h1 a margin-bottom value for the space between the text.
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
- @SecreSwalowtail
Hello, Nice work on your QR Component.
Here are some tips to improve it :
- You can use min-height: 100vh; on the body element to make it scale to the whole screen . This will also resolve the placement issue that you talked about , but you will need to adjust the existing padding/margin on other elements.
- It's best practice to not use set height/width. Use instead min-max height/width.
- Another good practice is to use rem / em measurement units for sizing components. Design files are usually made with them not with px units.
- You can target elements like body and main by simply typing the element with no dot.
- @TromhiesGIG
uhmmmm, so i am looking at the solution and wayyyy, my solution looks way untop the original design. That means i didn't get the spacing well or what? I don't mind if you could assit me on that
Join 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