IE Bug Workaround – Unclickable absolute positioned hyperlink over absolute positioned image

I had to fix an IE9 bug today where an absolute positioned hyperlink over an absolute positioned image was not clickable. Here’s an example of the code in question to give you a better idea of the problem.

At first I thought it was a z-index problem. But adding a z-index didn’t fix it.

I found a solution recommending the background-color of the hyperlink be set to an almost transparent colour with using RGBa. Unfortunately RGBa only works in IE9 for certain conditions and the page wasn’t going to meet those conditions without a lot of work.

In the end I resorted to using a transparent 1 pixel png image for background-image on the hyperlink. Not the cleanest solution, but it works.