Tainara
@tainarapalmeiraAll comments
- @CarlaCheikhSubmitted about 2 years ago@tainarapalmeiraPosted about 2 years ago
Hi @CarlaCheikh, Congratulations on completing this challenge! :)))
When I did this very challenge, I had the same issue related to image responsiveness. So here is a good tip to improve it: use the picture tag in your index.html. It allows you to deal easily with different images according to the width of the screen, for example. In this way, you don't need to create two different img tags with different classes (class="desktop-only" and class="mobile-only").
Associated with this, there is also a CSS property that can also help you which is the object-fit. This property specifies how images and videos should be resized to fit their container.
Check the link for the official documentation for <picture> and object-fit property in W3 SCHOOLS: https://www.w3schools.com/tags/tag_picture.asp https://www.w3schools.com/css/css3_object-fit.asp
I hope this helps you and happy coding!
Marked as helpful1