As part of a project redesigning the Kurzgesagt home page, I encountered a challenge when trying to make my a
tag stretch the full height of my img
. The a
tag was wrapping the img
in the HTML code.
Below is the code I used:
HTML
<a href="http://kurzgesagt.org/work/bitdefender/">
<img src="images/happyDevices.png">
</a>
CSS
a {
height: auto;
}
img {
width: 24.8%;
height: 24.8%;
margin: 0;
display: inline-block;
}