Design comparison
Solution retrospective
I would like to know how I can improve the way of inserting the images in different divs without adding another class for each one
Community feedback
- @rfilenkoPosted over 4 years ago
Hi, what's wrong with using simple img tag? 😉 Why overcomplicate it?
Roman
1@Elisa33Posted over 4 years ago@rfilenko I don't know, jaja. I'll try to do simplier, thanks!
0 - @ChanneasPosted over 4 years ago
Your solution looks good. I personally would use .icon:nth-child(1) (then 2 and so on) to set the images, as that would mean there's no need to have the .one class on your card. The way dacokid mentioned also works
0 - @dacokidPosted over 4 years ago
You can use JavaScript to create divs add those images to your HTML. With some coding you'll only write once and have multiple divs and images.
0@Elisa33Posted over 4 years ago@dacokid thank you very much for the reply. I don't know how to use js correctly yet.
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