Design comparison
Solution retrospective
^w^ hi,, I'm not sure where to start so I did a silly qr code, I think it looks pretty decent pff
Community feedback
- @visualdennissPosted over 1 year ago
Congrats on completing the challenge successfully! Looks great overall.
One suggestion is that instead of using margins to center the QR Code, use display: flex on the parent. Using margins to center like that might break the page layout when the app gets more complex and unwanted behaviours.
Remove this: /* margin: 12% auto auto auto; Add this to body: body { background-color: hsl(212, 45%, 89%); min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
Hope you find this feedback helpful!
Marked as helpful0 - @HassiaiPosted over 1 year ago
Replace<div class="base">with the main tag and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
Give h1 and p the same font-size of 15px which is 0.9375rem and the same margin-left, margin-right and margin-top values. Give p a margin bottom value.
Give alt attribute in the img a value. The value of the alt attribute is the description of the image. For decorative images like icons, there is no need to give it an alt value, for more on alt attribute Click here.
For a responsive image, there is no need to give .base a height value, replace its width with max-width and give the img a max-width of 100% instead of a width and height value.
To center .base on the page using flexbox or grid instead of margin, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
USING FLEXBOX: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
USING GRID: body{ min-height: 100vh; display: grid; place-items: center; }
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@nikomowPosted over 1 year ago@Hassiai thank you :> I'm unfamiliar with flexboxes and grids so I'll take a look at it
1 - @ecemgoPosted over 1 year ago
Some recommendations regarding your code that could be of interest to you.
- In order to fix the accessibility issues, you need to replace
<div class="base">
with the<main>
tag and<div class="attribution">
tag with the<footer>
tag. :) - You can also reach more information about HTML5 Semantic from Semantic HTML and Using Semantic HTML Tags Correctly.
Hope I am helpful. :)
Marked as helpful0 - In order to fix the accessibility issues, you need to replace
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