Created
June 26, 2013 02:58
-
-
Save meub/5864429 to your computer and use it in GitHub Desktop.
Semantic Div with Anchor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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