我有一个锚元素,其中包含一个包含图像和标题的div“imgbox”,以及一个包含一些文本的div“文本框”。
现在当我浮动div.imgbox时,里面的img元素不再可点击;标题和div.textbox中的文本是。这只发生在Internet Explorer中;所有其他浏览器都可以正常工作。
有谁知道造成这种情况的原因(以及如何解决)?谢谢!
这是我正在使用的css和html:
<style>
.wrap a {
display: block;
overflow: hidden;/* makes this a wrap around floats */
cursor: pointer;
}
.imgbox {
float: left;
}
.textbox {
overflow: hidden;/* positions the div next to the float */
}
</style>
<div class="wrap">
<a href="#">
<div class="imgbox">
<img src="http://jaron.nl/misc/dummy.gif" width="80" height="45" alt="" />
caption text is clickable
</div>
<div class="textbox">
some text here
</div>
</a>
</div>
答案 0 :(得分:0)
您正在img和链接标记之间使用div中的Block元素。