Stats preview card component using flexbox
Design comparison
Solution retrospective
Thank you everyone who has commented in my previous solution...From your suggestions i have made few changes and completed this challenge again...Hopefully now everything is ok....Please do tell me if i have make any mistake....and I'd be grateful if you can give me some feedbacks to improve π
Thank you @correlucas for your suggestion...it really helps a lot :)
Community feedback
- @correlucasPosted about 2 years ago
πΎHi Taskin Sultana, congrats on completing this challenge!
You did a good work putting everything together in this challenge, something you can do to improve the image that needs to change between mobile and desktop is to use
<picture>
instead of<img>
wrapped in a div. You can manage both images inside the<picture>
tag and use the html to code to set when the images should change setting the devicemax-width
depending of the device (phone / computer) Hereβs a guide about how to usepicture
:https://www.w3schools.com/tags/tag_picture.asp
βοΈ I hope this helps you and happy coding!
0 - @romila2003Posted about 2 years ago
Hi Taskin,
Congratulations π for completing this challenge, your Stats component looks great, and it is great that you used flex to center the card. Also, it is great that you used the right semantic for your code. I have some suggestions.
- To prevent the card from touching the side of the screen, particularly when adjusting screen sizes, you can give the
body
tag, amargin
property e.g.margin: 0 10px;
- Also, I realised that you took a desktop-first approach since you used the
max-width
within your media query. I would strongly suggest you use the mobile-first approach as it will be easier for responsiveness and rearranging/changing the elements as you increase the screen size. It is also best practice to use this approach.
Overall, great work and wish you the best for your future projects so keep coding π.
0 - To prevent the card from touching the side of the screen, particularly when adjusting screen sizes, you can give the
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