HTML文本和密码输入字段的大小不同Internet Explorer [英] HTML text and password input fields have difference size internet explorer
本文介绍了HTML文本和密码输入字段的大小不同Internet Explorer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用此表单设置作为我的登录表单:
I am using this form setting for my login form :
<tr>
<td class="label"> Username:</td>
<td> <input id="id_username" type="text" name="username" maxlength="30" /></td>
</tr>
<tr>
<td class="label"> Password:</td>
<td> <input a="text" type="password" name="password" id="id_password" /></td>
</tr>
当使用firefox时,两个输入框的大小均相同.但是,当我使用IE 9时,密码字段较小.
when using firefox both input boxes having the same size. However when I am on IE 9 , the password field is smaller.
摆脱这种行为的最佳方法是什么?
What is the best way to get rid of this behavior ?
推荐答案
使用CSS将固定的width
值应用于元素,例如:
Use CSS to apply a fixed width
value to the elements, for example:
.fixed-input {
width: 150px;
}
....
<input class="fixed-input" id="id_username" type="text" name="username" maxlength="30" />
这篇关于HTML文本和密码输入字段的大小不同Internet Explorer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文