다음 코드는 레이블과 입력 필드를 서로 나란히 놓아야합니다. 문제가 무엇인지 알 수 있습니까?레이블 및 입력 필드가 서로 나란히 놓이지 않습니다
.form{
width:500px;
float:left;
padding:20px 50px;
background-color:orange;
}
label.form{
float:left;
clear:left;
margin-bottom:8px;
}
input.input{
width:400px;
padding:5px 20px;
margin-bottom:8px;
background:#F7F7F7;
border-width:1px;
border-style:solid;
border-color:#333333;
}
<div class="form">
<form action="process.php" method="post">
<label class="form">Name</label><input type="text" name="name" class="input" />
<label class="form">Position</label><input type="text" name="position" class="input" />
<label class="form">Company</label><input type="text" name="company" class="input" />
<label class="form">Address</label><input type="text" name="address1" class="input" />
<label class="form">Town/ City</label><input type="text" name="town" class="input" />
<label class="form">Postcode</label><input type="text" name="postcode" class="input" />
<label class="form">Contact No.</label><input type="text" name="phone" class="input" />
<input type="submit" name ="getcatalogue" class="button" value="Request Catalogue"/>
</form>
</div>
어떤 이유로 든 라벨이 각 입력란 위에 있습니까? 도움이 될 것입니다 대단히 감사하겠습니다!
감사
'div.form label.form'과'input.input'을 가지고있는 이유는 무엇입니까? – FelipeAls