简体   繁体   English

图像按钮在Firefox中的图像顶部显示“提交查询”

[英]Image button displaying 'Submit query' over the top of image in Firefox

My project is displaying correctly in both IE and chrome. 我的项目在IE和Chrome中都能正确显示。 However in FF for some reason the image button displays 'Submit query' over the top of it. 但是在FF中由于某种原因,图像按钮在其顶部显示“提交查询”。 I am setting the image location in CSS and it is definitely correct as it is working correctly in all browsers, its just that FireFox for some reason plasters 'Submit Query' over the top on each image button. 我在CSS中设置图像位置并且它肯定是正确的,因为它在所有浏览器中都能正常工作,它只是FireFox因为某些原因在每个图像按钮的顶部提交“提交查询”。

Here is my CSS: 这是我的CSS:

.NavModuleTabs A.NavModuleSelectedWide1
{
color: #555555;
margin-top: 10px;
padding-top: 5px;
height: 25px;
background-image: url(../Images/NavBar/NavModuleTab_125.gif);
background-repeat: no-repeat;
font-weight: bold;
width: 130px;
display: block;
}

Does anybody have any ideas why this happens? 有没有人知道为什么会这样? I found a few solutions via google but nothing has worked for me so far. 我通过谷歌找到了一些解决方案,但迄今为止没有任何对我有用。

Thank you 谢谢

将此属性添加到按钮:

value=""

also add css display:block and 还添加了css display:block

Text-indent: -9999px; 文字缩进:-9999px;

Then it will work in all browsers 然后它将适用于所有浏览器

still comes top in the google list so adding my 2 cents worth: the answers above work but don't address the cause; 仍然在谷歌名单中排名第一,所以加上我的2美分价值:上面的答案,但没有解决原因; in our case it was the missing imageurl after replacing it with css like the above, in which case one simple solution is to use a linkbutton instead 在我们的例子中,它是用上面的css替换后丢失的imageurl,在这种情况下,一个简单的解决方案是使用linkbutton代替

Text-indent: -9999px; 文字缩进:-9999px; add this to your css 将此添加到您的CSS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM