Design comparison
SolutionDesign
Solution retrospective
I'm still relearning responsive layout. If anyone has suggestions on what reading materials that can help me learn it fast!
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
<main>
tag to wrap all the main content of the page instead of the<div>
tag. With this semantic element you can improve the accessibility of your page.
- 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
CSS π¨:
- You should use the
box-sizing: border-box
property to make thewidth
andheight
properties include the padding and border of the element. This will make it easier to calculate the size of an element. You can read more about this here π.
- To center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here π.
body { /* margin: 50px; */ min-height: 100vh; display: flex; background-color: hsl(212, 45%, 89%); font-family: Outfit; justify-content: center; align-items: center; flex-direction: column; } .wrapper { /* margin-left: auto; */ /* margin-right: auto; */ . . . }
-
You should use a CSS reset to remove the default browser styles and make your page look the same in all browsers.
Popular CSS resets:
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0 - Use the
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