Here is a simple HTML structure:
<div> <img style="width:100%;height:100%"/> </div>
The div appears like this in Chrome:
https://i.sstatic.net/pIFRf.png
However, there is a gap between the div and the image:
https://i.sstatic.net/5RobX.png
I noticed that the image is supposed to cover the entire div,
If I increase the height of the div by more than 10px, everything looks perfect.
https://i.sstatic.net/2ATyV.png
Now, the image covers the whole div:
https://i.sstatic.net/nBdxa.png
Upon testing, it was observed that if the height of the div is less, the gap becomes larger.
So what could be the issue here?
Provided below is an example snippet of code from my project for reference. You can refer to the image using Chrome Dev Tools: