Design comparison
Solution retrospective
Let me know how to make this better :D
Community feedback
- @Ezekiel225Posted 9 months ago
Hello there π @andzz-zz
Good job on completing the challenge !
Your project looks really good!
I have suggestions about your code that might interest you.
π First: Use
<main>
to wrap the main content instead of<div>
.Tags like
<div>
and<span>
are typical examples of non-semantic HTML elements. They serve only as content holders but give no indication as to what type of content they contain or what role that content plays on the page.πUsing margin is not the best option to center an element. Here's a very efficient (and better) way to place an element in the middle of the page both vertically and horizontally: π Apply this to the body element (in order to work properly, don't use position or margins):
body { min-height: 100vh; display: flex; /* it works with grid too */ justify-content: center; align-items: center; }
πIf you don't have the Figma design files, I recommend using a browser extension called Perfect Pixel.
It allows you to compare your finished project with the design images that come along when you download the project and check the (almost exact) dimensions. It's very useful!
I hope this suggestion is useful for future projects.
Other than that, great job!
Keep up the excellent work and continue to challenge yourself with new projects. Your progress is impressive, and each project is a step forward in your front-end development journey! ππ.
Happy coding.
Marked as helpful1 - @dev-mksinghPosted 9 months ago
Hey @andzz-zz, congrats on completion of your project. Here are the following points you need to look into:
- Your project is responsive but not completely, try to resize your screen and you will find that on screen size between
378px -660px
thelist elements
are overflowing. - After looking your code i'm sure you isn't using
mobile-first approach
and the consequence of that is you mentioned element size for small screens i.e.375px
@media screen and (max-width: 375px){ .container{ max-width: 100%; margin: 15px 15px; } }
so you already set the width of container previously by
max-width:20%
by :.container { max-width: 20%; }
, now what browser understand is that, for smaller screen the size of the element will be 20% and for small size till 375px the element width is 100%. So setting
max-width:20%
for bigger screen is not required which you did here:@media screen and (min-width : 1445px) { .container { max-width: 20%; height: auto; } }
- Okay so my last point might be surprising to you a bit, but simply set the
max-width: 300px
orwidth:300px
for.container{}
and removemax-width
from1445px
. you will find your code will work as you expect even for bigger screen. And you will have to write less code.
I know this is long but read it carefully if still you don't get it, lemme know. Hope this is helpful. All the best.
Marked as helpful0 - Your project is responsive but not completely, try to resize your screen and you will find that on screen size between
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