Home > Web Front-end > HTML Tutorial > 怎么把这些文字对齐?_html/css_WEB-ITnose

怎么把这些文字对齐?_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:29:36
Original
1455 people have browsed it

没加入center元素的时候,显示是这样的,我现在想把里面的内容居中过去,然后在下添加了

元素
<!DOCTYPE html><html>	<head>		<meta charset="utf-8" />		<style type="text/css">			fieldset{				width: 664px;				height: auto;				border: 1px solid #d5d5d5;				padding-left: 20px;			}			legend{				color: #a53e91;				font-size: 20px;				font-family: "黑体";			}            label{				font-weight: bold;			}			form{				color: #787878;			}		</style>	</head>	<body>		<form id="form1" action="" method="post">			<fieldset>				<legend>填写信息</legend>				<br />				<br />				<center>				<label for="name3" class="juli">用户名: </label>				<input type="text" name="name01" id="name01" />				<span class="font02">(中文)</span>				<input type="text" name="name02" id="name02" />				<span class="font02">(拼音)</span>				<br />				<br />				<label for="bh" class="juli">Lee全球会员编号: </label> 				<input type="text" name="bh" id="bh" />				<br />				<br />				<label for="pass01" class="juli">密码: </label>				<input type="password" name="pass01" id="pass01" />				<br />				<br />				<label for="pass02" class="juli">确认密码: </label>				<input type="password" name="pass02" id="pass02" />				<br />				<br />				<label for="zjzl" class="juli">证件类型: </label>				<select name="zjzl" id="zjzl">					<option id="zjzl1">身份证</option>					<option id="zjzl2">学生证</option>				</select>				<label for="zjhm">证件号码: </label>				<input type="text" name="zjhm" id="zjhm" />				<br />				<br />				<label><span class="juli">联系方式: </span>手机</label>				<input type="radio" name="dx" value="单选" id="dx_0" />				<label>座机</label>				<input type="radio" name="dx" value="单选" id="dx_1" />				<input type="text" name="dh" id="dh" />				<br />				<br />					</center>			</fieldset>			<input type="image" name="button" id="button" src="img/214.gif" />		</form>	</body></html>
Copy after login

显示就变成这样了
想问下,怎么在居中的情况,让里面的文字对齐啊,这样的格式看着挺乱的


回复讨论(解决方案)

你可以考虑表格的实现方式,更容易控制。

表单倾向于用表格  

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template