谁能告诉我为什么第一个文本框在下面的 HTML/CSS 中没有对齐?(此处为 JSFiddle)。
<div class="gift_code_fields">
<div class="gift_code_line">
<div class="gift_code_line_header">
<label for="1">1</label><span>:</span>
</div>
<input class="gift_code" id="gift_code_1" name="gift_code_1" type="text">
</div>
<div class="gift_code_line">
<div class="gift_code_line_header">
<label>2</label>
<span>:</span>
</div>
<input type="text" class="gift_code">
</div>
<div class="gift_code_line">
<div class="gift_code_line_header">
<label>3</label>
<span>:</span>
</div>
<input type="text" class="gift_code">
</div>
<div class="gift_code_line">
<div class="gift_code_line_header">
<label>4</label>
<span>:</span>
</div>
<input type="text" class="gift_code">
</div>
</div>
.gift_label{
width: 30px;
display: inline-block;
font-weight: bold;
}
.gift_code_section{
margin-bottom: 30px;
}
.gift_code_choose{
width: 100px;
float: left;
}
.gift_code_fields{
width: 300px;
display: inline-block;
}
.add_gift_code{
cursor: pointer;
}
.gift_code {
display: inline;
}
.gift_code_line_header{
display: inline;
width: 20px;
margin-right: 10px;
}