按钮链接在Firefox,IE中不起作用 [英] Button link doesn't work in Firefox, IE
问题描述
我在Chrome中使用的链接很好,但不包含IE或Firefox。如果你点击它们,什么都不会发生。我弄乱了CSS(包括z-index),但是没有想法。这是来自Drupal的XHTML。
html看起来像这样:
< div class =product-display-block-link>
<按钮>
< a href =/ checkout / outfield-banner / 1>加入购物车< / a>
< / button>
< / div>
有什么建议可以在哪里看?
a
元素。 I have links inside of that work fine in Chrome, but not IE or Firefox. Nothing happens if you click on them. I've messed with the CSS (z-index included), but am out of ideas. This is XHTML coming out of Drupal.
The html looks like this:
<div class="product-display-block-link">
<button>
<a href="/checkout/outfield-banner/1">Add to cart</a>
</button>
</div>
Any suggestions for where I can look?
The HMTL syntax does not allow an a
element within a button
element, so it is not surprising that it does not work across browsers. There should be no reason to use such a construct, since you can either style a link to look like a button or associate an action with a button, depending on what you wish to accomplish.
这篇关于按钮链接在Firefox,IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!