Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
Well I didn't learn much
What challenges did you encounter, and how did you overcome them?center div... i left out position absolute
What specific areas of your project would you like help with?none
Community feedback
- @cillianbcPosted 8 months ago
Have a look at using semantic HTML like <section>
Marked as helpful0 - @grace-snowPosted 8 months ago
There are some important foundational learnings from this challenge:
- All content should be contained within landmarks. This needs a
main
wrapping the container. You could make container into a section too but there is really no benefit at all to doing that. - The image is extremely important content. It must have a proper alt description saying what it is ("QR code") and where it goes ("to FrontendMentor.io")
- Remove all of those
br
s. That is not how you create line breaks. They need to happen naturally. - The html file should always be called index.html
- It's better for performance to link fonts in the html head instead of css imports.
- Never limit the height of elements that contain text. It's fine to use min-height on the body but not set a height.
- Do not use position absolute to center a component in the viewport. Use flexbox or css grid. Position absolute removes the elements from the document flow and could lead to really awful bugs.
- Always use a modern css reset at the start of the styles in every project. Get into the habit now. Andy Bell or Josh Comeau both have good ones you can look up and use.
- The image must not have an explicit width. All it needs is display block and max-width 100% (which would already be included in the css reset)
- Font size must never be in px
- You seem to be confusing padding and margin in this. I've written a post about padding and margin which you may find helpful.
1 - All content should be contained within landmarks. This needs a
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