English 中文(简体)
IE7 错误 - 范围正在覆盖链接
原标题:IE7 bug - span is covering up link

下面的代码使整个 & lt; a> 标签可以与 & lt; a> 标签中包含一些可爱的 cs 链接。 它对除 IE7 外的所有浏览器都有效( 也可能是 6 ) 。 在 IE7 中, # go space 似乎覆盖了链接 。 其余 div 的连接除了 space 元素之外, 它与页面中任何正常部分一样 。 我尝试过更改 z- index, 并用块块显示 。 最后的办法是用另外的 & lt; a> 标签来覆盖宽度, 但这只是粗略的... 任何人都有更好的解决方案吗?

.orangebutton {
    position: relative; 
}
.orangebutton a {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}
<div class="orangebutton floatright" id="home-go-button4">
    <span id="go" style="display: block">Go</span>
    <a href="http://google.com"></a>
</div>
最佳回答

这是 IE (< a href=>"https://stackoverflow.com/ questions/215892/preaty-div-hover-hover-event-not-firing-in-ie/2159004#2159004") 的窃听器(< a href=>"https://stackoverflow.com/ questions/215892/prees/25892/pty-div-hover-hover-event-not-firring-in-ie/2159004#2159004") > 在 IE < /a > 中不发射的空格旋事件)

解决方案是设置 a 标签的背景, 但是由于您需要它透明, 只需添加透明背景图像 。

demo at http://jsfiddle.net/3m93n/1/
(transparent image hotlinked from the internet.. create a local version..)

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签