Design comparison
SolutionDesign
Solution retrospective
Any feedback is welcome.
What is the best way to add the cart icon? I did it with pseudoelement. But is another better or does it matter?
Community feedback
- @md5daltonPosted about 2 years ago
Hello Patosinsuerte
You can also use:
<img src="/images/icon-cart.svg" alt="cart icon" />
It's important to use HTML for content and CSS for styling, so if your intend is that the icon should not be part of the page content, use
background-image
instead as you did with the pseudo element👌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