I would like to understand why a spacing between the image and the div is created? As you can see by adding the red background. And how to fix without using position
or margin
and padding
negatives?
.box-img {
width: 100%;
max-width: 200px;
background-color: red;
// tentando remover padding
padding: 0 !important;
}
.box-img > img {
width: 100%;
height: 100%;
// tentando remover margin
margin: 0 !important;
}
<figure class="box-img">
<img src="http://img1.topimagens.com/ti/th/200x200/lobos/lobos_068.jpg"alt="">
</figure>