当我将内容包装在< a>标记,该链接在IE中不起作用,有帮助吗? [英] When I wrap contents in an <a> tag, the link doesn't work in IE, help?
本文介绍了当我将内容包装在< a>标记,该链接在IE中不起作用,有帮助吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道这可能会让人皱眉,但是客户希望将实时文本包装在一个标签中....
I know this is probably frowned upon, but a client wants live text wrapped in ONE tag....
所以,这是我的难题:
我有一些类似这样的代码:
I have some code like this:
<a href="google.com">
<img src="img.jpg" style="float:left;">
<div style="float:right;">
<h3>Title</h3>
<p>Description</p>
</div>
<div style="clear:both;"></div>
</a>
我将样式设置为display:block.
I styled the to be display:block.
此方法在FF5中效果很好,IE =并非所有内容都是可单击的,在此示例中,仅图像是可单击的.Chrome =有效.Safari =有效.
This method works great in FF5, IE = not all content is clickable, in this example only the image is clickable. Chrome = works. Safari = works.
如果您使用其他方法,则可能会建议您提供它.
If you have a different method you might suggest please offer it.
提前谢谢!
推荐答案
尝试像这样设置链接样式:
Try setting the link style like this:
<a style="display: block; position: relative;" ><div/></a>
这篇关于当我将内容包装在< a>标记,该链接在IE中不起作用,有帮助吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文