Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Forms: Password field question?
Old 05-31-2005, 10:47 PM Forms: Password field question?
Novice Talker

Posts: 7
Trades: 0
Hello everyone,

I am running into a problem I don't recall having before. For some reason when I make the input type "password" (to make the text entered in asterisks instead of text) on my password field it will no longer match the the lenght of the "username" field. Below is my form:

-----------------------------------------------------

<form action="no_permission.php" method="post">
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td align="center" valign="middle"><div align="center"><strong><font color="#000000">Username:</font></strong></div></td>
<td align="left" valign="middle"><div align="left">
<input name="username" type="text" class="FormBx" id="username" size="12"<?php if(isset($_POST['submit'])) echo " value=\"".$_POST['username']."\"" ?>>
</div></td>
</tr>
<tr>
<td align="center" valign="middle"><strong>Password:</strong></td>
<td align="left" valign="middle"><input name="password" type="password" class="FormBx" id="password" size="12"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<th align="center" valign="middle" scope="col"><div align="center">
<input name="submit" type="submit" class="formbutton" id="submit" value="Log In">
</div></th>
</tr>
</table>
<br>
<?php
if (isset($_POST['submit']) && !empty($message))
echo $message."<p>";
?>
</form>

-----------------------------------------------------

If I try to change the password field length to 13 it is barely shorter and if I change it to 14 it is longer then the username field. I just can't get them to line up with the password field set to use the asterisks. If I remove the password asterisks and change the field to "text" they, of course, line up fine.

Thanks in advance for your help as this is driving me a bit crazy..

Mark
Maquar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-01-2005, 02:27 AM
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
Chuck this css in between your head tags...

<style type="text/css">
<!--
#username, #password {
width: 72px;
}
-->
</style>
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Old 06-01-2005, 02:32 AM
Novice Talker

Posts: 7
Trades: 0
Thanks for your reply!

Actually, I finally figured it out. Adding a style to the form field using fixed size fonts worked.

Example:

style="font: 10px/11px courier;"

Don't know why it took me so long to remember that!

Thanks again,

Mark
Maquar is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Forms: Password field question?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.82746 seconds with 12 queries