Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Vanilla HTML, CSS (flexbox and grid), and JS site.

Jun 220

@JunYuHuang

Desktop design screenshot for the Insure landing page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

P
Matt Studdert 13,611

@mattstuddert

Posted

Your solution looks awesome, Jun! Just a quick heads up that the vh units are currently throwing off the screenshot. I'd recommend only using the vh unit in very specific circumstances, as it can have unintended consequences, especially on short viewports. Instead, I'd let the height on the inner content dictate the height of the parent. It's much better to use margin and padding on elements than forcing the height directly.

Keep up the great work!

1

Jun 220

@JunYuHuang

Posted

@mattstuddert Thanks Matt for the tip! Didn't realize using vh units was not recommended for most cases. Margin and padding aside, what do you think about using percentages instead?

0
P
Matt Studdert 13,611

@mattstuddert

Posted

@JunYuHuang I'd recommend avoiding setting the height of an element wherever possible, regardless of the unit. This is especially true for elements that contain a lot of content. It's fine in very specific instances, but should be mostly avoided.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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