Stats Preview Card Component Main with help of VH and VW
Design comparison
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
- @MelvinAguilarPosted about 1 year ago
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
withrem
orem
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 helpful0@Priyanshu-WDPosted about 1 year agoThank you so much @MelvinAguilar. I will work on this.
0 -
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