Skip to content

Instantly share code, notes, and snippets.

@meub meub/gist:5864429
Created Jun 26, 2013

Embed
What would you like to do?
Semantic Div with Anchor
.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');*/
}
<div class="container">
text
<a href="https://www.google.com">
<span class="link-spanner"></span>
</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.