Design comparison
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Nikita , Congratulations on completing this challenge!
I saw your preview site and I liked a lot the work you’ve done here, it's almost complete, I’ve some suggestions you can consider applying to your code:
You did a good work putting everything together in this challenge, something you can do to improve the image that needs to change between mobile and desktop is to use
<picture>
instead of<img>
wrapped in a div. Look that for SEO and search engine reasons isn’t a better practice import this product image with CSS since this will make harder to the image be found. You can manage both images inside the<picture>
tag and use the html to code to set when the images should change setting the devicemax-width
depending of the device (phone / computer) Here’s a guide about how to usepicture
:https://www.w3schools.com/tags/tag_picture.asp
It is not advisable to use IDs as CSS selectors because if another element in the page uses the same/similar style, you would have to write the same CSS again. Even if you don't have more than one element with that style right now, it might come later.
✌️ I hope this helps you and happy coding!
Marked as helpful0@tossik8Posted about 2 years ago@correlucas Hello Lucas, I have used the picture tag and now the right image renders, thank you. I will take your advice into account regarding the usage of classes instead of IDs, it makes sense. Thank you and happy coding!
1@correlucasPosted about 2 years ago@tossik8 I'm happy to hear that Nikita! Keep it up with the good work.
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