I was trying to read into how to make a link which can be clicked anywhere within a div and found a solution to my problem from this other stack exchange question which can be found here.
The concept of it is simple and it seems like it should work, but I'm having an issue with the technique. Specifically, clicking on the link will result in no page movement despite cursor indication that it has found a link. However, right clicking in the region that I want to be a link and selecting "open in new tab" will direct me to the linked content.
HTML:
<div class="container">
hello
<a href="https://www.google.com">
<span class="link-spanner"></span>
</a>
</div>
CSS:
.container{
width:200px;
height:200px;
background-color:black;
color:white;
/*Important:*/
position:relative;
}
/*Important:*/
.link-spanner{
position:absolute;
width:100%;
height:100%;
top:0;
left: 0;
z-index: 1;
/* edit: fixes overlap error in IE7/8,
make sure you have an empty gif
background-image: url('empty.gif');*/
}
Is there a reason why my browser would recognize a link yet not open that link on left click? I'm using chrome version 39. The same behavior can be found in this JSFiddle page which was from one of the comments of the answer supplied above. Left clicking the link will not direct me to google like it should.