#Debug# Display: block

I was coding a website and found an issue like this:

These are two <div> with a <img> respectively, something like this:

<div>

<img/>

</div>

Although I set the <img> to height:100%; there was still a slight gap you can see in the image above. In dev tool, it showed that the <img> itself didn’t cover the entire height of its parent <div>.

Solution:

set display:block; to <img>, then the gap dispears.