I have a web application with an image tag which has a css class but no src
attribute. Something like this:
<img class="image"/>
The css class just defines the url of the image and its size but no border properties are defined. The problem is that a white border is being rendered for the image only in chrome browser (it works fine in firefox and IE11). I've tried to remove it explicitely through css rules but until now I can't.
A solution is to set the url of the image through the src
attribute but I have too many images which take their source from css rules. So, is there any way to remove that white border from css? Maybe is that a chrome bug?
This issue is happening to me from few days ago. It seems it comes with the last update of chrome.
Here you have a jsfiddle to test what I say.
And here you have directly the same code snippet of the jsfiddle example:
body {
background-color: brown;
height: 100%;
position: absolute;
width: 100%;
}
.image {
background-image: url("http://www.ultimatedesignertoolkit.com/wp-content/uploads/2013/06/preview1.png");
background-repeat: no-repeat;
background-size: 600px 400px;
content: '';
display: inline-block;
height: 400px;
padding: 0;
position: relative;
top: 5px;
vertical-align: top;
width: 600px;
}
<div>
<img class="image"/>
</div>