Design comparison
Solution retrospective
is there any thing which is not correct , it's fully responsive also tried to match the font as well.What do you think is this good enough?
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 π:
- Wrap the page's whole main content in the
<main>
tag.
- Always avoid skipping heading levels; Starting with <h1> and working your way down the heading levels (<h2>, <h3>, etc.) helps ensure that your document has a clear and consistent hierarchy. Source π
Alt text π·:
-
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 π¨:
- Instead of using pixels in font-size, use relative units like
em
orrem
. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here π.
- To center an element vertically, you should use a height to its container. In this case it is recommended to use "min-height: 100vh" so that it occupies 100% of the viewport height. e.g.:
body { min-height: 100vh; }
.
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
1 - Wrap the page's whole main content in the
- @HassiaiPosted almost 2 years ago
Replace <div class="container"> with the main tag, <h2> with <h1> and <h4> with <p> to fix the accessibility issues. click here for more on web-accessibility and semantic html
To center .container on the page, add min-height: 100vh to the body. The body has a wrong background color. Use the colors that were given in the styleguide.md found in the zip folder you downloaded.
For a responsive content which wont require a media query for this challenge, replace the height in .container with a padding value for all the sides and replace the width max-width .
There is no to style .bottom and .bottom2.
Give h1 and p the same font-size of 15px, text-align: center, 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
0
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