Design comparison
Solution retrospective
I like how flex-wrap: wrap moves the metadata onto another line when there's not enough space.
I noticed at very small screen sizes the avatar's width shrinks to accomodate the text next to it, I suppose using the same flex-wrap property would be a solution to keep the avatar's aspect ratio perfect.
Community feedback
- @correlucasPosted about 2 years ago
👾Hello again Darren O'Hehir, Congratulations on completing this challenge!
Two tips for you:
1.To improve your component overall responsiveness, something you can do its to create a media query to save space in the
pricing section
to make each information in a different row. Here’s the code for this media query.@media (max-width: 350px) { .metadata { display: flex; justify-content: space-between; flex-wrap: wrap; padding-top: 1rem; flex-direction: column; align-items: center; } }
2.Use units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.3.To reduce your css file and improve the performance loading your page you can use a tool called
css minify
that reduces the css code removing the unnecessary characters. You can use aVSCode
plugin calledminify css
or this website tool to reduce your code:https://www.toptal.com/developers/cssminifier
✌️ I hope this helps you and happy coding!
Marked as helpful1@darrenohelloPosted about 2 years ago@correlucas Thanks again for the great feedback! I'm not yet very confident with media queries so I appreciate you showing me that example (I'll get there eventually!)
1
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