I am trying to line up <img>
with a div but it seems like there is some margin/padding in <img>
.
Here is what i tried:
.Box {
display: inline-block;
}
.myDiv {
background: blue;
width: 100px;
color: white;
}
img {
margin: 0px !important;
padding: 0px !important;
width: 100px;
height: 100px;
background: red;
}
<div class="Box">
<div class="myDiv">
Content
</div>
</div>
<div class="Box">
<img src="https://i.ytimg.com/vi/2VLDkNjAUBU/maxresdefault.jpg">
</div>
I wish it would look like this: