开发者

how to fix the size of password input field?

开发者 https://www.devze.com 2023-01-09 14:11 出处:网络
my html code is <tr> <td>User ID:</td> 开发者_如何学C<td><input type=\"text\" id=\"uid\" size=\"20\"></td>

my html code is

<tr>
                <td>User ID:</td>
           开发者_如何学C     <td><input type="text" id="uid" size="20"></td>
            </tr>
            <tr>
                <td>Password:</td>
                <td><input type="password" id="pass" size="20"></td>
            </tr>
            <tr>

but the problem is, password textbox length is coming diffrent in IE, means uid size is 20 but pass size is around 17.


Try using style="width:200px" for example rather than specifying size that way.

<input type="text" id="uid" style="width:200px;">
<input type="password" id="pass" style="width:200px;">

Or you can create a class in the CSS like this:

.input{
  width:200px;
}

And use like this:

<input type="text" id="uid" class="input">
<input type="password" id="pass" class="input">


You can fix it with width: 150px; (with CSS).

In CSS file :

input {
  width: 150px;
}

Or in inline CSS : style="width: 150px;" .

Edit : Grilled :) .

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号