HTML菜鸟求助~~想要文本框对齐,所以想到用表格,但是没想到底下按钮不知道怎么回事对不齐【有代码】
<html><body><palign="center"><b>PleaseLogIn</b></p><tablealign="center"><tr><td>Login...
<html>
<body>
<p align = "center"><b>Please Log In</b></p>
<table align = "center">
<tr>
<td>Login:</td>
<form><td colspan = "2"><input type = "text"></td></form>
</tr>
<tr>
<td>Password:</td>
<form><td colspan = "2"><input type = "password"></td></form>
</tr>
<tr>
<td></td>
<td><form><input type = "submit" value = "OK"></td>
<td><form><input type = "button" value = "Forget Password"></td>
</tr>
</table>
</body>
</html>
出来效果是这样的,为啥OK和ForgetPassword对不齐啊。。要对齐得怎么改?
还有,我想让文本框像图中那样对齐,除了用表格还有什么其他方法吗?求指教!谢谢了~~ 展开
<body>
<p align = "center"><b>Please Log In</b></p>
<table align = "center">
<tr>
<td>Login:</td>
<form><td colspan = "2"><input type = "text"></td></form>
</tr>
<tr>
<td>Password:</td>
<form><td colspan = "2"><input type = "password"></td></form>
</tr>
<tr>
<td></td>
<td><form><input type = "submit" value = "OK"></td>
<td><form><input type = "button" value = "Forget Password"></td>
</tr>
</table>
</body>
</html>
出来效果是这样的,为啥OK和ForgetPassword对不齐啊。。要对齐得怎么改?
还有,我想让文本框像图中那样对齐,除了用表格还有什么其他方法吗?求指教!谢谢了~~ 展开
3个回答
展开全部
标签太乱了:
<table width="300" border="1">
<tr>
<td>Login:</td>
<td><input type = "text" /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type = "password" /></td>
</tr>
<tr>
<td colspan="2"><input type = "submit" value = "OK"><input type = "button" value = "Forget Password"></td>
</tr>
</table>
<table width="300" border="1">
<tr>
<td>Login:</td>
<td><input type = "text" /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type = "password" /></td>
</tr>
<tr>
<td colspan="2"><input type = "submit" value = "OK"><input type = "button" value = "Forget Password"></td>
</tr>
</table>
展开全部
<html>
<head>
<title>login</title>
</head>
<body>
<center>
<h1>请输入用户信息:</h1>
<form action="loginServlet" method="post">
<table border="1">
<tr>
<td>用户名:</td>
<td>
<input type="text" name="username"></input>
</td>
</tr>
<tr>
<td>密 码:</td>
<td>
<input type="password" name="password"></input>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="submit" value="登录"></input>
<input type="reset" value="重置"></input>
</td>
</tr>
</table>
<h2>如果你还没有注册,请注册?</h2>
<a href="register.jsp">立即注册</a>
</form>
</center>
</body>
</html>
这个是我写的 你自己看看有没有用
<head>
<title>login</title>
</head>
<body>
<center>
<h1>请输入用户信息:</h1>
<form action="loginServlet" method="post">
<table border="1">
<tr>
<td>用户名:</td>
<td>
<input type="text" name="username"></input>
</td>
</tr>
<tr>
<td>密 码:</td>
<td>
<input type="password" name="password"></input>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="submit" value="登录"></input>
<input type="reset" value="重置"></input>
</td>
</tr>
</table>
<h2>如果你还没有注册,请注册?</h2>
<a href="register.jsp">立即注册</a>
</form>
</center>
</body>
</html>
这个是我写的 你自己看看有没有用
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询