Insure Landing Page Using CSS Grid & JS (Commented & Organised Code)

Solution retrospective
I will be really grateful if I can get my code reviewed. Any feedback on how to further improve it are welcome. Thanks!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @mattstuddert
Nice work on this challenge! You've done a really good job. You can see from the design comparison above that your overall layout is really good. The major areas you could tweak would be things like spacing,
font-weight
, andfont-size
to get it to really match up to the design. It's well worth spending the time to make these refinements, as attention to detail is a great skill to build up as a front-end developer.I noticed your main image often gets squashed or stretched. This is because you're setting the
height
andwidth
on it. There are two possible solutions:- Avoid setting both the
height
and thewidth
. If you only set one of them, the other will take care of itself. I typically prefer setting thewidth
and leaving theheight
to be calculated automatically. - If you really need to set both of them, use
object-fit
to make sure the image always maintains its aspect ratio. The value I use most often for this iscover
. So the full declaration would beobject-fit: cover;
.
I hope that helps. Keep up the great work and let me know if you have any questions! 🙂
- Avoid setting both the
Join 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