@TalluriRahulSubmitted almost 2 years ago
how can i include the svg cart icon?
how can i include the svg cart icon?
Hello Talluri Rahul 👋🏻
To insert the .svg image, first you need to put the .svg icon in the project folder. After that you need to link it like this:
<button id="submit" type="submit" value=""><img class="cart" src="./images/icon-cart.svg" alt="shopping-cart">Add to cart</button>
As you can see, I solved the problem with the button tag which contains source for the icon (src="./images/icon-cart.svg").
Later, you can style it in the CSS sheet.
.cart { position: absolute; top: 36%; left: 28%; }
Hope this helps. Happy coding! 😊