2011-03-01 151 views
1

我有一个简单的传送带在我的网站上工作,但是一旦我的代码被插入到客户端的系统(force.com)的东西阻止了按钮在IE 。按钮不工作在IE浏览器,罚款Firefox/Opera/Chrome

'prev'按钮是可见的,但不可点击。 '下一个'按钮没问题。

我在我的网站转盘:http://carolineelisa.com/TITTB/html/carousel.html

编辑:客户的网站:http://www.tittb.org/

代码:

<div id="hasJavaScript" style="display: none"> 
    <button type="button" class="prev"></button> 
    <div class="carousel"> 
    <ul> 
     <li><img src="images/carousel_thumb_2.jpg" alt="" width="190" height="105" class="carousel-item-2"></li> 
     <li><img src="images/carousel_thumb_3.jpg" alt="" width="190" height="105" class="carousel-item-3"></li> 
     <li><img src="images/carousel_thumb_4.jpg" alt="" width="190" height="105" class="carousel-item-4"></li> 
     <li><img src="images/carousel_thumb_5.jpg" alt="" width="190" height="105" class="carousel-item-5"></li> 
     <li><img src="images/carousel_thumb_1.jpg" alt="" width="190" height="105" class="carousel-item-1"></li> 
    </ul> 
    </div> 
    <button type="button" class="next"></button> 
</div> 

的CSS

button.prev { 
background: url("carousel_arrow_left.gif") no-repeat scroll left center transparent; 
width: 23px; 
height: 105px; 
float: left; 
padding:0; 
margin:0; 
} 
button.prev:hover { 
    background-position: -30px center; 
} 
button.next { 
    background: url("carousel_arrow_right.gif") no-repeat scroll 5px center transparent; 
    width: 15px; 
    height: 105px; 
padding:0; 
margin:0; 
} 
button.next:hover { 
background-position: -25px center; 
} 
+0

不错的网站的方式:) – 2011-03-01 15:31:44

+0

什么版本的IE浏览器?我在IE9和兼容模式(IE7?)中看不到任何问题 – jeroen 2011-03-01 15:39:42

+0

谢谢Daniel! @jeroen,嗯,这是问题...它在我的工作,但不是在客户端的IE8 – 2011-03-01 18:12:48

回答

1

使用<input type="button" />代替<button type="button"></button>

您必须在CSS中更改button这个词。它会是从W3Schools的input.previnput.next然后

报价:

重要:如果您在HTML表单中使用按钮元素,不同的浏览器将提交不同的值。 Internet Explorer将提交和标记之间的文本,而其他浏览器将提交value属性的内容。使用输入元素在HTML表单中创建按钮。

+0

这没有什么区别,它们没有被提交,它们只是javascript事件的钩子。 “按钮”比“输入”更容易风格化,虽然简单的“a”也可以在这里完成...... – jeroen 2011-03-01 15:41:39

0

您可以使用Firebug,可以看到什么引擎盖下回事然而还有就是你面临这种情况下 CSS Problem behind content not clickable

我相信,没有什么做输入型可能性很大=“按钮”或按钮类型=“按钮”

相关问题