I had to make the link of a div
<div onclick="location.href='<?php the_permalink() ?>';></div>
to make it work the way I needed it too. (Using Wordpress)
But I also need the link to open in a new window using target="_blank" but that I can't figure out how to apply that to an onclick in a div. Anyone any ideas?