First time using this technique, seems that regardless what attributes I try to assign the border will not go away in Chrome. Other browsers are fine. I've tried outline:none, border:0; etc, etc. Also tried adding a colored border around the image, and noticed the the black border was still there within the colored border. Doesn't seem to want to go away.
Work-around's or advice much appreciated.
.share-link {
display: block;
width: 41px;
height: 32px;
text-decoration: none;
background: url("link-icon.png");
}
.share-link:hover {
background-position: -41px 0;
}
<a title="Share this Link" href="#"><img class="share-link"></a>
Adding border="0" to your img tag prevents that picture from having a border around the image.
Remove a border from a picture Select the picture whose border you want to remove. On the Page Layout tab, in the Page Background group, select Page Borders. Click the Borders tab. Under Setting, select None.
It's because you are using an img
tag with no src
attribute. Chrome is essentially indicating the size of the container with nothing in it.
If you don't want to place an image between the anchor tags, then don't use an image tag. It's not necessary to place anything between the tags.
Demo here.
you can use a base64 very small transparent image
<img class="share-link" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With