The img tag behaves like a inline and bock element, basead on this answer: Is <img> element block level or inline level?
That's why you have to display block on the img inside a div with inline-block.
The img tag behaves like a inline and bock element, basead on this answer: Is <img> element block level or inline level?
That's why you have to display block on the img inside a div with inline-block.