我在该字段下有一条验证消息,但我希望它在同一行。(请不要评判我的前端技能,特别是 css 和 html =))
现在
我想要的是
CSS
@CHARSET "UTF-8";
#reg-form {
display: block;
width: 600px;
}
#reg-form li {
width: 250px;
display: block;
padding: 5px 5px;
}
#reg-form li label {
width: 150px;
float: left;
}
.status {
font-size: 14px;
color: red;
}
#register-user {
float: left;
margin-left: 7px;
padding: 5px 5px 5px 5px;
}
HTML
{% block main-menu %}
<div class="contentarea">
<form method="post" action="">{% csrf_token %}
<ul id="reg-form">
<li>
<label for="id_username">Username:</label>
<input id="id_username" type="text" name="username" maxlength="30" />
</li>
<div class="status"></div>
<li>
<label for="id_email">Email:</label>
<input type="text" name="email" id="id_email" />
</li>
<div class="status"></div>
<li>
<label for="id_password">Password:</label>
<input type="password" name="password" id="id_password" />
</li>
<div class="status"></div>
<li>
<label for="id_password2">Password (Again):</label>
<input type="password" name="password2" id="id_password2" />
</li>
<div class="status"></div>
</ul>
<input type="button" value="register" id="register-user"/>
</form>
</div>
{% endblock %}