I have a png image which has transparent space around the actual image.
like this
I want to place this image as a background for a div. But the div should only display the image without the transparent area around it.
This is what I have now. https://jsfiddle.net/qhoty913/8/
How can I make sure that the inner div image starts from the actual image and it wont have the blank spaces around it. Is it possible without modifying the actual png image file?
.imgBck {
margin: 10px;
width: 300px;
height: 200px;
background-image: url('https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png');
background-size: cover;
border-style: dotted;
}
.borderDiv {
border-style: solid
}
<div class="borderDiv">
<div class="imgBck">
</div>
</div>