Design comparison
Solution retrospective
Tried this one. It was a good challenge. I think I have used too many tags and too many styling elements, sometimes more than it's needed. It would be really nice if somebody can go through my code and tell me whether I can optimize it or this is okay?
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Pratyusha, Congratulations on completing this challenge!
I saw your preview site and I liked a lot the work you’ve done here, it's almost complete, I’ve some suggestions you can consider applying to your code:
1.You made your html structure entirely with
div blocks
but these div doesn't any semantic meaning, for this reason is better you use a better html markup improving your code, for example for each vehicle card you use<article>
instead of the<div>
.2.You’ve used
px
as the unit for sizes but the problem with pixels is that its not optimized for multiple devices and screens. So a good fit its to userem
orem
that have a better performance and make your site more accessible between different screen sizes and devices.REM
andEM
does not just apply to font size, but to all sizes as well.3.Something that can be a time saver for you is to use a CSS RESET to remove all default settings for margins, making the images easier to work, see the article below where you can copy and paste this css code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
✌️ I hope this helps you and happy coding!
Marked as helpful0@FloraBloombluePosted about 2 years ago@correlucas Thankyou. I will definitely use the <article> tag for next challenges.
1@FloraBloombluePosted about 2 years ago@correlucas Although, could you help me explain the CSS Reset a little bit more or suggest some tutorials easy to understand or some kind of example. It would be really kind of you. Thankyou, Anyway!!!
0@correlucasPosted about 2 years ago@FloraBloomblue The CSS reset its just some code you copy and paste on your css sheet to fix some annoying default settings, for example the link that comes with decoration and the color blue, the margins that have a value around 10px and with the CSS reset you have with 0. This file reset a lots of these stuff, you understand?
Marked as helpful0
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