我有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