I am encountering an issue where I am trying to insert an image into a bordered div, but in Chrome 96.0 there are unexpected margins appearing from the top and left that I cannot seem to remove.
Below is the code I am using:
.wrapper {
width: 36px;
height: 36px;
border: solid 2px red;
padding: 0;
}
.img {
width: 100%;
height: 100%;
background: green;
margin: 0;
}
<div class="wrapper">
<div class="img"></div>
</div>
Here is what I am observing:
https://i.sstatic.net/6WGg9.png
This is what my friend sees when viewing the page in Safari: