厕所小窗户对楼道好吗:文本字段对齐的问题

来源:百度文库 编辑:神马品牌网 时间:2024/05/02 08:56:16
<table width="160" height="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="55" height="20" align="left" valign="middle"><span class="STYLE21">用户名:</span></td>
<td width="105" height="20" align="left" valign="middle"><form id="form1" name="form1" method="post" action="">
<label >
<input name="user_id" type="text" size="11" />
</label>
</form> </td>
</tr>
<tr>
<td width="55" height="20" align="left" valign="middle"><span class="STYLE21">密 码:</span></td>
<td width="105" height="20" align="left" valign="middle"><form id="form1" name="form1" method="post" action="">
<label width="105" height="20" align="left" valign="middle">
<input name="password" type="password" size="11" />
</label>
</form></td> </tr></table>

“用户名”和对应的文本字段老对不齐,请问高手怎么解决

这样就没问题了。

<style type="text/css">
<!--
.css1 {
font-family: "宋体";
font-size: 12px;
line-height: 25px;
text-decoration: none;
}
-->
</style>
<table width="160" height="60" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" height="20" align="left" valign="top"><span class="css1">用户名:</span></td>
<td height="20" align="left" valign="middle"><form id="form1" name="form1" method="post" action="">
<label >
<input name="user_id" type="text" size="11" />
</label>
</form> </td>
</tr>
<tr>
<td width="100" height="20" align="left" valign="top"><span class="css1">密 码:</span></td>
<td height="20" align="left" valign="middle"><form id="form1" name="form1" method="post" action="">
<label width="105" height="20" align="left" valign="middle">
<input name="password" type="password" size="11" />
</label>
</form></td> </tr></table>