text & password input controls have different lengths

admin

Administrator
Staff member
Hello<br />
<br />
I am displaying a logon page with input controls for username and password.<br />
here is a portion of my code:<br />
<br />
<table border="0" cellpadding="0" cellspacing="0" width="1%"><br />
<tr><br />
<td width="1%" nowrap>Username:</td><br />
<td><input type="text" size="20" name="email"></input></td><br />
</tr><br />
<tr><br />
<td width="1%" nowrap>Password:</td><br />
<td><input type="password" size="20" name="password"></input></td><br />
<td><input type="submit" name="logon" value="Log on"></input></td><br />
</tr><br />
</table><br />
<br />
notice that I have set the size of both controls to 20, however they are displayed with different lengths!! Is there a way to make them have the same length?<br />
Even when I play around with the size values, I cannot get them to have equal lengths.<br />
<br />
thanks in advance.<!--content-->instead of 'size' use CSS. Like so: Style="width: 20px;"<br />
<br />
use that in place of your 'size=20'. I dont think that size is even a valid attrbute ;)<!--content-->Make use of the maxlength attribute to limit the amount of characters the field can contain:<input type="text" maxlength="20" />Moreover, as Phil implied: use CSS for any presentational purposes.<!--content-->You should consider external sheets as your site gets larger though :)<!--content-->
 
Back
Top