Design comparison
Solution retrospective
So how is my project? Did you find faults?
Community feedback
- @correlucasPosted about 2 years ago
πΎHi @Coderio10, 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.You need to import the correct font that is
Outfit
. First of all you need to choose the font usingGoogle Fonts
https://fonts.google.com/ and import the code to drop on your CSS/HTML:
Hereβs the css code for this font and should be placed at the top of your CSS sheet:
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,700;1,400&family=Outfit:wght@300;400;600;700&display=swap');
Add this to the body to add the font to the style:
font-family: 'Outfit', sans-serif;
2.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.3.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.
4.Add a margin of around
margin: 20px
to avoid the card touching the screen edges while it scales down.5.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!
Marked as helpful1 - @Coderio10Posted about 2 years ago
Thanks i'll improve on that. Don't worry you will see improvement on my next challenges.
0 - @denieldenPosted about 2 years ago
Hello Anointed, You have done a good work! π
Some little tips to improve your code:
img
element must have analt
attribute, it's very important!- after, add descriptive text in the
alt
attribute of the images - remove all unnecessary code, the less you write the better as well as being clearer: for example the
div
container of texts - remove all
margin
from.bgn2
class and body - use flexbox to the body to center the card. Read here -> best flex guide
- after, add
min-height: 100vh
to body because Flexbox aligns child items to the size of the parent container - instead of using
px or %
use relative units of measurement likerem
-> read here
Keep learning how to code with your amazing solutions to challenges.
Hope this help π and 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