Design comparison
Solution retrospective
I have faced width issue in images in flexbox...I'm confused how to place images in this challenge..I have use background property to place the image..but it doesn't getting me the full width and height...Need some solutions for it....and I'd be greatfull if you can give me some feedbacks to improve 🙏
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Taskin Sultana, Congratulations on completing this challenge!
You’ve done really good work here putting everything together, I’ve some suggestions to improve the design:
You need to fix the
container size
that is a bit off, this challenge uses the standard container size that ismax-width: 1110px
.To make the image have a better fit inside of it, make the component image responsive with
display: block
andmax-width: 100%
(this makes the image fit the column/div size) and respect the component size while it scales down. To make it crop while scaling useobject-fit: cover
.img { display: block; object-fit: cover; max-width: 100%; }
✌️ I hope this helps you and happy coding!
Marked as helpful0 - @kevintataPosted about 2 years ago
Hey! To put your div and image right next to each other using flexbox, Use Flex-direction: row; That will wake your elements line up next to each other. Hope this helps!
0 - @llKryptonixllPosted about 2 years ago
you can add background-position: center that improves the look of the image in this case and great work btw
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