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

Stats Preview Card Component Main with help of VH and VW

Priyanshu Pramanikโ€ข 380

@Priyanshu-WD

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hey, folks

This is my 9th solution so far, but I'm still struggling with media queries. Please guide me, on how can I can fix the issue in this project.

Any output will be highly appreciated!

Community feedback

@MelvinAguilar

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

I have some suggestions about the units that might interest you.

  • Avoid setting fixed component heights; let content, padding, and text naturally determine element heights to prevent excessive sizing on larger screens.

    Also, setting a fixed height can cause content to overflow. Try viewing your solution on a mobile device in landscape orientation to see that all the text overflows. This issue is due to the defined height that prevents the component from growing appropriately

  • Avoid viewport units for widths and heights in your design. Instead, use max-width with rem or em for widths, and let content define element heights for improved screen size adaptability.
  • Do not use 'vw' for font-size. Just because a screen is large doesn't mean the text size should be large as well. If you want font sizes that can adapt to different devices, you can explore using 'clamp' in font-size, but relying solely on 'vw' is not practical."

I hope you find it useful! ๐Ÿ˜„ Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

0

Priyanshu Pramanikโ€ข 380

@Priyanshu-WD

Posted

Thank you so much @MelvinAguilar. I will work on this.

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