Design comparison
Solution retrospective
Hello world!
What I've found a little bit complicated was making image adapt to the container. Looking at some solution, I've adapted them to my case, thanks to the great community here on Frontend Mentor!
Any suggestion will be highly appreciated! Have a nice day! :D
Community feedback
- @correlucasPosted about 2 years ago
πΎHello Francesco, congratulations for your new solution!
Here's my tips to improve your component and image responsiveness:
Add
display: block
andmax-width: 100%
to make the image responsive andobject-fit: cover
to have the effect cropping the image inside the container while the container resize:.img-container img { display: block; max-width: 100%; object-fit: cover; }
π I hope this helps you and happy coding!
Marked as helpful1
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