我的代码要怎么修改才行呢?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Register</title>
<style>
.header{
text-align:left;
}
</style>
</head>
<body>
<form action="result.jsp" name="registerInfoForm" method="post">
<div class="header">
用户名:
<input name="usernametext" type="text" />
密码: <input name="passwordText" type="text" /> <br><br>
你喜欢:<input name="favoriteCB" type="checkbox" />足球
<input name="favoriteCB" type="checkbox" />篮球
性别:<input type="radio" name="sex"/>男 <input type="radio" name="sex"/>女 <br><br>
你的计算机:<br>
<textarea name="computerInfo" style="width:300px;height:auto"></textarea> <br><br>
你的计算机的操作系统:<input type="text" name="OSInfo" /> <br><br>
你所在地:
<select name="city">
<option value="beijing">北京
<option value="shanghai">上海
</select><br><br>
<input type="submit" name="Ok" value="提交" />
<input type="reset" value="全部重置" />
</div>
</form>
</body>
</html>
不行,虽然不是靠左了,但也不是居中的