Responsive card using CSS and HTML

Solution retrospective
I couldn't add the svg icon through css and could only paste it on HTML, but I'm not sure why.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Soaphub
Hello Aimee, I reviewed your code you copied the HTML element <svg> from the website which could only be used in index.html. If u want to place an image through CSS, you have to download the SVG from the website. Then place it in your project folder. Then follow any of these steps.
- You could use <imag> with atribute src="the location of svg" in index.html.
- Add a div with class then update the file location of the image in CSS. But don't forget to add the width and height or else the image won't be displayed. eg: .class{background-image: url(location of image);} For further reference, you could refer freeCodeCamp
Join 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