2010-06-16 160 views
1

余米使用在所有的浏览器提交按钮,我的表格其做工精细,除了IE7 当在其上的用户点击它移动请建议我该怎么办上点击提交按钮移动itsplace

.confirm-button-submit 
{ 
    width  : 79px; 
    font  : bold 12px sans-serif;; 
    color  : #000; 
    background  : url("../images/confirm-btn.png") 0 -33px no-repeat; 
    text-decoration : none; 
    margin-top  :0px; 
    text-align:center; 
    border:0px; 
    cursor : pointer; 
    height:32px; 
    padding  : 8px 0px 12px 0px; 
} 

.confirm-button-submit:hover 
{ 
    width  : 79px; 
    font  : bold 12px sans-serif;; 
    color  : #fff; 
    background  : url("../images/confirm-btn.png") 0 0 no-repeat; 
    text-decoration : none; 
    margin-top  :0px; 
    text-align:center; 
    border:0px; 
    cursor : pointer; 
    height:32px; 
    padding  : 8px 0px 12px 0px; 
} 

我用这个CSS请告诉我该怎么做

代码:

<input type="button" value="Show" name="commit" onclick="range_validation(this)" class="confirm-button-submit"/>` 
+1

请显示更多的html和你的js函数“range_validation”(如果可能的话,一个在线演示将会非常好) – oezi 2010-06-16 09:53:20

+0

另外,“移动”是什么意思? – Kyle 2010-06-16 09:55:38

+0

据我所知无论它在IE 7上显示它的一个错误。其他浏览器正在压制它。 用你给出的代码不容易追踪出了什么问题。所以请提供更多信息。 – 2010-06-16 09:58:10

回答

0

悬停类自动继承不指定任何值,因此任何重复的属性,你可以删除。

你是什么意思移动?如果你的意思是当你悬停时,按钮移动,然后删除冗余属性将有助于缩小哪些属性造成这种情况。

如果点击了,那么你需要向我们展示javascript函数“Range_validation”,看看它是否定位了任何东西。

0

首先,你的CSS可广泛减少:

改进的CSS:

.confirm-button-submit, .confirm-button-submit:hover 
{ 
    width   : 79px; 
    font   : bold 12px sans-serif;; 
    color   : #000; 
    background  : url("../images/confirm-btn.png") 0 -33px no-repeat; 
    text-decoration : none; 
    margin-top  : 0; 
    text-align  : center; 
    border   : 0; 
    cursor   : pointer; 
    height   : 32px; 
    padding   : 8px 0px 12px 0px; 
} 

.confirm-button-submit:hover 
{ 
    color  : #fff; 
    background : url("../images/confirm-btn.png") 0 0 no-repeat; 
} 

随着你的CSS,一切似乎正常,问题可能是,可能会影响另一个全局样式您按钮或网页的其他元素...您是否有链接查看“实际操作”中的问题?

-1

提交悬停具有不同于其他提交类的值的图像值,不确定它们是什么(从未使用额外的值),但它们看起来像定位或边距类似的值。这些可能会导致图像改变的地方,当他徘徊它...也许?