Jump to content


Photo

Textfields don't have the same width


  • Please log in to reply
3 replies to this topic

#1 freddykhalid

freddykhalid
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 21 April 2006 - 07:58 AM

Hey guys, I am having a problem getting the textfields for both the Login and the Password Fields the same width. Using Firefox, I have no problem. But using IE, it can be clearly seen that the Password field is shorter than the Login field.

Here is my code:

<form action="index1.php" method="post">
  <table width="70%" cellpadding="1" cellspacing="0" border="0">
    <tr>
        <td>
        <table width="100%" height="100%" cellpadding="1" cellspacing="0" border="0" bgcolor="white">
        <tr><td align="center">
        <table width="78%" height="100%" cellpadding="1" cellspacing="0" border="0" bgcolor="white">
        <tr align="center"></tr>
        <tr>
            <td>Login ID</td><td>:</td><td align="left"><input type="text" name="login_id" maxlength="40"></td>
        </tr> 
        <tr>
            <td class="label">Password</td><td>:</td><td class="label" align="left"><input type="password" name="pass" maxlength="40"></td>
        </tr>
        <tr><td><? if($_POST['submitForm'] == "Login") {echo "Login/Pwd Incorrect!";}?></td></tr><tr><td colspan="3" class="copyright"><div align="center">
          <input type="submit" name="submitForm"  value="Login" />&nbsp;&nbsp;&nbsp;&nbsp;
          <input name="reset" type="reset" value="Clear">
           &nbsp;</div></td>
        </tr>
        </table>
        </td>
        </tr>
        <tr><td>&nbsp;</td></tr>
        </table>
        </td>
    </tr>
</table>
</form>


#2 gizmola

gizmola
  • Administrators
  • Advanced Member
  • 4,664 posts
  • LocationLos Angeles, CA USA

Posted 21 April 2006 - 08:22 AM

[!--quoteo(post=367124:date=Apr 21 2006, 12:58 AM:name=freddykhalid)--][div class=\'quotetop\']QUOTE(freddykhalid @ Apr 21 2006, 12:58 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Hey guys, I am having a problem getting the textfields for both the Login and the Password Fields the same width. Using Firefox, I have no problem. But using IE, it can be clearly seen that the Password field is shorter than the Login field.

Here is my code:


[/quote]

How about trying size= for both inputs.

#3 freddykhalid

freddykhalid
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 23 April 2006 - 11:40 AM

When I try size, Mozilla Firefox shows both textfields wth differrent sizes while IE shows them as close as possible but not exact.
Looks like a compromise situation etween IE and Mozilla!


#4 knokkel

knokkel
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 23 April 2006 - 12:58 PM

try style="width:100px;" in the input tag...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users