Design comparison
Solution retrospective
Not quite sure if my colors are correct and if media queries are necessary . Any feedback would be welcomed.
Community feedback
- @danielmrz-devPosted 9 months ago
Hello @Souheib-Aloui!
Your solution looks great!
I have a suggestion for improvement:
- Use
<main>
to wrap the main content instead of<div>
.
π Think of
<div>
and<span>
in HTML like plain boxes or placeholders. They're handy for holding content, but they don't tell us anything about what's inside or what it's meant for on the webpage.This tag change does not impact your project visually and makes your HTML code more semantic, improving SEO optimization as well as the accessibility of your project.
I hope it helps!
Other than that, great job!
1 - Use
- @VenusYPosted 9 months ago
Great work on this challenge! You've done well replicating the design, and the site is very responsive on top of that.
Your colours seem correct to me, but if you're worried about them, you can use this image colour picker site to get the exact colours that you need: https://imagecolorpicker.com/
All you need to do is take a screenshot of the thing that you want to extract the colours from, and then paste it directly into that website. No need for downloading and uploading the image, so it's very simple and easy to use.
Alternatively, you can use the 'Color Picker' tool from Microsoft PowerToys, which is an immensely useful tool that allows you to pick colours directly from the screen.
If you haven't got Microsoft PowerToys yet, you can install it from the official Microsoft site right here: https://learn.microsoft.com/en-us/windows/powertoys/
As for the site itself, one minor thing I would suggest is adding some padding to your page:
body { padding: 20px; }
I used 20px as an example, but you may of course adjust the value to your liking.
While this change isn't strictly necessary, it's highly recommended as it makes for a better user experience in most cases.
This is because whitespace is good for the visual balance of a page, and in some cases, it even improves readability.
Other than that, well done once again for completing this challenge!
Hope this has been helpful! :)
1 - @Ezekiel225Posted 9 months ago
Hello there π @Souheib-Aloui.
Good job on completing the challenge !
Your project looks really good!
I have a suggestion 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.πSecond: 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!
πThird: 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; }
I hope this suggestion is useful for future projects.
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! ππ.
Other than that, great job!
Happy coding.
1
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