I was struggling with a piece of code to make an image based link within a relative positioned div. The problem was the div overlapping the area of the link. The result was only a small part beeing clickable. After various non-workable solutions I finally added a z-index:1 and a relative position to the anchor to get it to work. The snippet below will demonstrate how to do it.
<a style="position: relative; z-index: 1;" href="url">
<img src="image.png" alt="" />