Design comparison
Community feedback
- @correlucasPosted about 2 years ago
๐พHi @shojoDev, 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; flex-direction: column; justify-content: center; align-items: center; text-align: center; font-family: "Outfit", helvetica, sans-serif; }
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.4.Clean your code by removing some unnecessary divs, most of the content can stand alone without a div. Use div only for blocks that need a special alignment or the content needs a special positioning.
5.Add a margin of around
margin: 20px
to avoid the card touching the screen edges while it scales down.6.Use relative units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.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!
0@shojoDevPosted about 2 years agoHello @correlucas, thanks for the suggestions. Could you take a look at my changes to my .css (https://github.com/shojoDev/QR-Code-Component) file and let me know if I had it correct, or if you could make the changes for me to look it up as a reference if that's OK by you. This is actually my 1st project and I would appreciate any little help you'll have to offer.
0 - @ShayokhShorfuddinPosted about 2 years ago
Hello shojoDev! How are you doing? I have some UI suggestions for you -
- Increase the height and width of the component.
- The font sizes "might" need some adjustment.
- At last, adjust the bottom text using padding.
That's all from me. Have a nice day buddy! ๐
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