嗨,我有以下html文件,其中包含3個輸入選項。如下如何對齊input-group-addon的寬度
<script type="text/ng-template" id="dashboard_assigngroup_popup.html">
<div class="modal-header modal-header2">
<h3 class="modal-title">Assign Chart Group</h3>
</div>
<div class="modal-body">
<table class="table">
{%verbatim %}
<tr>
<td>
<div class="input-group" style="padding:1%;">
<span class="input-group-addon">Chart title</span>
<select type="input" class="form-control" ng-model="final_data.info" ng-options="m.id as m.title for m in chartlist" required ng-cloak>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="input-group" style="padding:1%;">
<span class="input-group-addon">Chart group</span>
<select type="input" class="form-control" ng-model="final_data.group" ng-options="c.id as c.name for c in chartgrouplist" required ng-cloak>
</select>
</div>
</td>
</tr>
<tr>
<td colspan="5">
<div class="input-group" style="padding:1%;">
<span class="input-group-addon">Order </span>
<input type="input" class="form-control" placeholder="Order" ng-model="final_data.orderg">
</div>
</td>
</tr>
<tr>
<td colspan="4">
<div class="modal-footer">
<button class="btn btn-success" type="button" ng-click="submit()" id="submit">Save</button>
<button class="btn btn-grey" type="button" ng-click="cancel()">Discard</button>
</div>
</table>
{% endverbatim %}
</div>
</script>
但input-group-addons沒有對齊。試圖使用CSS對齊,但沒有這樣做。我如何對齊這個input-group-addons?任何建議傢伙?提前致謝。
你的問題是不明確......可能是你可以給一個codepen或的jsfiddle? 你只是使用元素,並跨越它們 - 除非,你的css爲弄亂了對齊,所有span.input-group-addon元素應該左對齊。 – Tharaka