我想在一行中使用bootstrap對齊5個html組件。Bootstrap - 對齊問題
但是不能這樣看起來很醜,打破了第二條線而不是一條線。
HTML
<div class="form-group">
<p class="col-md-2 badge col-md-offset-1">Column 1</p>
<p class="col-md-1 badge">Column 2</p>
<p class="col-md-1 badge">Column 3</p>
<p class="col-md-2 badge">Column 4</p>
<p class="col-md-2 badge">Column 5</p>
</div>
<div class="form-group" ng-repeat="data in allData">
<label class="control-label col-md-3">{{data.label}}</label>
<div class="input-group col-md-4">
<input id="reportTypeId" type="text" class="form-control" ng-model="data.reportTypeId" style="display: none">
<datepicker date-format="yyyy-MM-dd">
<input id="startDate" type="text" class="form-control" ng-model="data.startDate">
</datepicker>
<p class="input-group-addon glyphicon glyphicon-calendar"></p>
<datepicker date-format="yyyy-MM-dd">
<input id="endDate" type="text" class="form-control" ng-model="data.endDate">
</datepicker>
<p class="input-group-addon glyphicon glyphicon-calendar"></p>
<select class="form-control" ng-model="data.countryId" required="required">
<option value="">Please select</option>
<option ng-repeat="country in countrys" value="{{country.countryId}}">{{country.countryLabel}}</option>
</select>
<select class="form-control" ng-model="data.cityCode" required="required">
<option value="">Please select</option>
<option ng-repeat="city in cities" value="{{city.code}}">{{city.desc}}</option>
</select>
</div>
</div>
更新: -
的jsfiddle:http://jsfiddle.net/jjayaraman/5dbkf1xw/
請創建的jsfiddle所以我們可以很容易地理解。 www.jsfiddle.net –
@UIXpider謝謝JSFiddle。 – Jay