I am currently working on optimizing my website by using sprite images.
The image I am using is in png format and looks like this:
https://i.sstatic.net/pFhPq.png
Here is a snippet of my CSS code:
.bg-upperbar_1 {
width: 55px; height: 55px;
background: url('../../assets/img/home/spritesheet.png') -10px -10px;
}
And this is the relevant part of my HTML code:
<a class="home-upperbar home-top" href="<?php echo site_url('products/collection_watches'); ?>">
<img class="bg-upperbar_1">
</a>
However, when I try to load the page, I encounter a border around the image, even though it is in png format, like this:
https://i.sstatic.net/FryxX.png
Can anyone help me troubleshoot and solve this issue?