Design comparison
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.
Community feedback
- @imfabraPosted over 3 years ago
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!
0@rishabh0540Posted over 3 years agoHey Daniel! Thanks for sharing your solution. It helped me indeed. You made really close to the challenge.
0 - @franziskawichPosted over 3 years ago
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
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