i used flexbox in making this

Solution retrospective
This is my first project on frontendmentor.io and i tried making this without bootstrap. I have used flexbox in it. but facing some issue with flex-wrap property. Also the size of image is not changing despite using flex property. please help me with it.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @imfabra
I invite you to look at the solution I gave to this exercise and leave your comment: https://www.frontendmentor.io/solutions/stats-preview-card-component-solution-html5-css3-bem-QCrz6ndBt
Let's keep coding!
- @franziskawich
Hi Rishabh,
a suggestion for your problem with the sizing of the image: try using object-fit: cover; and width: 100%; on the class for your image. (https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit)
This doesn't fix everything of course... the first box takes up too much space afterwards but it's a start. (:
You could remove your padding on box1, set flex: 1 0 0px; on both boxes (now they should have an equal width) and then use flexbox on box1 again to center the rest of the elements correctly. I am not sure if this is the best solution or if this would work, it probably needs some more changes but that's how I would approach it.
Good luck~
Franzi
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