Design comparison
Community feedback
- @davinceeyPosted about 2 years ago
Hello Akinrinlola olamide. Congratulations on your first project! Just some little tips for improvement:
- You could make use of the
display: flex
to centralize your solution. You could make use of this code:
body{ display: flex; justify-content: center; align-items: center; }
-
You could wrap all your content with the
<main>
tag and then make use if theh1
tag as a level-one heading. It would be perfect if it replaces theh3
tag used in your code and it would help in improving Accessibility. -
You could also make use of relative units like the
em
andrem
units for your font-sizes, padding, margins and widths. This would help to improve your site's responsiveness.
Hope this helps you. Happy Coding!π
Marked as helpful0 - You could make use of the
- @correlucasPosted about 2 years ago
πΎHi @Procodx, congratulations for your first solution!π Welcome to the Frontend Mentor Coding Community!
Great solution and great start! By what I saw youβre on the right track. Iβve few suggestions to you that you can consider to add to your code:
1.Use
<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.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 level of importance, never jump a level.3.Use 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.4.Your component is okay but it's missing the vertical alignment. The best way to do it is by using
flexbox
. First step is to addmin-height: 100vh
to make the body height size becomes 100% of the screen height, this way you make sure that whatever the situation the child element (the container) align the body and then use the flex properties for alignment withdisplay: flex
/align-items: center;
/justify-content: center;
body { MIN-HEIGHT: 100VH; background-color: hsl(212, 45%, 89%); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
βοΈ I hope this helps you and happy coding!
Marked as helpful0@ProcodxPosted about 2 years ago@correlucas thank you very much for your corrections ....uve thought me new things ππ§‘
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