Kindly go through this link and notice the solution given by "thepeer": https://stackoverflow.com/a/3494108
I am having trouble understanding his solution. Let me illustrate with the example of a webpage that I am trying to build. I am using HTML5 to build "buttons". Now since these buttons are actually DIV objects, I somehow need to make them "clickable" which would lead the viewer to another page, and that too, without making the "link" visible. The div object should act as a button and I don't intend to "include" a hypertext-ed line of text inside the button.
I think the solution given by "thepeer" does exactly that but i am unable to understand his solution and implement it. Perhaps a very small example would benefit me.
Suppose this is the button that i want to make :
<div id="music" class="nav">
Music I Like
<span id="hyperspan"><a href="Music.html"></a></span>
</div>
And here's the CSS as "thepeer" suggested :
.hyperspan
{
position:absolute;
width:100%;
height:100%;
left:0;
top:0;
z-index:1;
}
Now, obviously, I misunderstood his solution and hence my above attempt is incorrect. I don't want to resort to javascript so please help me! Sorry for my noobish-ness.