Design comparison
Community feedback
- @correlucasPosted about 2 years ago
👾Hi @elder-ramos, congratulations on your solution!👋 Welcome to the Frontend Mentor Coding Community!
Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:
1.Fix the alignment of the whole content using
flex
andmin-height
to manage the vertical alignment and make everything centered.First of all putmin-height: 100vh
to thebody
to make the body display 100% of the viewport height (this makes the container align to the height size that's now 100% of the screen height) size anddisplay: flex
eflex-direction: column
to align the child element (the container) vertically using the body as reference.body { min-height: 100vh; background-color: hsl(212, 45%, 89%); display: flex; align-items: center; justify-content: center; flex-direction: column; }
2.Add
<main>
instead of<div>
to wrap the card container. This way you show that this is the main block of content and also replace the div with a semantic tag.3.Replace the
<h3>
containing the main title with<h1>
note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level.Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR
✌️ I hope this helps you and happy coding!
Marked as helpful1 - @AK-CHP1Posted about 2 years ago
Congratulations on completing the project
I think the project would look better if you vertically center the
.card
section element. You can do that either by playing with margin values or using something like flexbox or positions (margin: auto
doesn't help in centering vertically, you could instead usemargin: <some value> auto
) . Also consider settingfont-size
ofp
element to 15px (as mentioned in the style guide), because it seems too small and almost becomes unreadable on small viewport. You should also use media queries to make some changes with the card for mobile layout.All the best. Please consider checking my solution of this problem here
Any feedback and suggestions on how I can improve are very welcome!
Marked as helpful1
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