我有3個divs:其中2個在一行中,第三個在它們下面。 我想要將TextBox與上面的TextBox進行協調。設置div元素中的寬度元素
您有解決方案嗎?
非常感謝!
.form-group {
float: left;
width: 50%;
height:50px;
}
.form-group label {
float:left;
width: 130px;
}
.form-group input {
float:left;
width: 230px;
}
<div class="form-group">
<label for="name">Name</label>
<input id="name" type="text" />
</div>
<div class="form-group">
<label for="family">Family</label>
<input id="family" type="text" />
</div>
<div class="form-group" style="width:100%;">
<label for="address">Address</label>
<input type="text" id="address" style="width:67%"/>
</div>
它看起來OK一整頁上:http://aug.imghost.us/QWQo.jpg但是當頁面大小被改變的盒裝沒有很好地對齊:http://aug.imghost.us/QWRO.jpg
完美的作品。非常感謝。 –
如果您將我的答案投票出來,我將不勝感激:)或選擇「最佳答案」 – deniskoronets