首先,你需要设置
width: 100%
要跨越的输入类型。在您的布局中,容器已经占据了整个宽度。
你也应该使用
display:flex
在你的
input-wrapper
并设置
flex-direction: column;
justify-content: flex-end;
.row {
display: flex;
}
.input-wrapper {
flex: 1;
padding-left: 15px;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
select{
width: 100%;
}
select, input{
border: 1px solid #e1e1e1;
padding: 6px;
border-radius: 3px;
}
label{
font-size: 14px;
color: #d1d1d1;
margin-bottom: 4px;
}
<div class="row">
<div class="input-wrapper">
<label>Additional Space</label>
<select>
<option>hello</option>
</select>
</div>
<div class="input-wrapper">
<label>Size</label>
<input type="text" placeholder="length" />
</div>
<div class="input-wrapper">
<label></label>
<input type="text" placeholder="width" />
</div>
<div class="input-wrapper">
<label></label>
<select>
<option>hello</option>
</select>
</div>
</div>
<br/><br/><br/><br/><br/>
<div class="row">
<div class="input-wrapper">
<label>Additional Space</label>
<select>
<option>hello</option>
</select>
</div>
<div class="input-wrapper">
<label>Size</label>
<input type="text" placeholder="length" />
</div>
</div>