按钮大小在IE和Firefox中不相等 [英] Buttons size not equal in IE and Firefox
本文介绍了按钮大小在IE和Firefox中不相等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的jsp页面上有几个按钮,我使用的风格为:
I have few buttons on my jsp page and I am using the style as :
*.buttonblue {
background-color: #003366;
border-color: #99CCFF;
color: #FFFFFF;
font-family: Verdana,Arial,Helvetica;
font-size: 8pt;
font-weight: bold;
height: 20px;
display:inline;
line-height: 1.2;
text-align: center;
margin-top: 2px;
}*
在Firefox中,按钮比IE6小一些。
我不能定义按钮的大小,因为字幕改变了按钮的大小相应地改变。
In Firefox the buttons are bit smaller than IE6. I can not define the size of buttons as the caption changes the button size changes accordingly.
我尝试了宽度:自动,但没有成功。此外,与溢出:可见的IE中的按钮变得位小。
I tried with width:auto but no success. Also, with overflow:visible the buttons in IE becomes bit smaller.
请帮助。
推荐答案
http://www.quirksmode.org/css/condcom.htmlrel =nofollow noreferrer>条件意见:
Either use Conditional Comments :
例如:
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->
或者将输入的自定义宽度设置为只读IE,如下所示:
Or set custom width for input only read by IE like this :
.buttonblue {
background-color: #003366;
border-color: #99CCFF;
color: #FFFFFF;
font-family: Verdana,Arial,Helvetica;
font-size: 8pt;
font-weight: bold;
height: 20px;
display:inline;
line-height: 1.2;
text-align: center;
margin-top: 2px;
width: 100px; /* Read by FF */
#width:100px; /* Read by IE*/
}
现在你可以相应地调整它们了。
Now you can tweak them accordingly
这篇关于按钮大小在IE和Firefox中不相等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文