Created
June 18, 2014 15:32
-
-
Save ituki/75a2daf5de7cb83507a5 to your computer and use it in GitHub Desktop.
IE7でaの中のspan がクリックできない ref: http://qiita.com/ituki_b/items/d6bded0c9dc2a3735b51
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
/* HTML */ | |
<ul class="clearfix"> | |
<li><a href="http://jsdo.it"><span class="pic"><img src="http://dummyimage.com/200x150/000/fff" alt=""></span><span>クリックできない</span></a></li> | |
</ul> |
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
/* CSS */ | |
li a span { | |
display: block; | |
} | |
↓ | |
li a span { | |
position: relative; | |
display: block; | |
z-index: -1; | |
} |
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
/* HTML */ | |
<ul> | |
<li><a href="http://jsdo.it/"><span><img src="http://dummyimage.com/50x50/000/fff" alt=""></span><span>クリックできない</span></a></li> | |
</ul> |
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
/* CSS */ | |
li { | |
margin-top: 5px; | |
list-style: none; | |
} | |
li a span { | |
display: table-cell; | |
/display: inline; | |
/zoom: 1; | |
vertical-align: middle; | |
} | |
↓ | |
li { | |
margin-top: 5px; | |
list-style: none; | |
/zoom: 1; | |
} | |
li a span { | |
position: relative; | |
display: table-cell; | |
/display: inline; | |
/zoom: 1; | |
vertical-align: middle; | |
z-index: -1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment