代码
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-search"></i>
</div>
<input type="text" class="form-control" id="txtPreCurrentdate" data-provide="datepicker" placeholder="Enter a Start Date">
<span class="input-group-addon">-</span>
<input type="text" class="form-control" id="txtPostCurrentdate" data-provide="datepicker" placeholder="Enter an End Date">
<!-- want the below section to move to the right. -->
<div class="input-group-addon">
<i class="fa fa-server"></i>
</div>
<input type="number" id="txtResltsPerPage" class="form-control" ng-model="pageSize" placeholder="Results per Page 10">
</div>
使用上面的代码,所有元素彼此相邻,如上图所示。我需要上面代码中的最后<input>
和<div>
元素显示在form
的右侧。
答案 0 :(得分:1)
包装:
<div class="input-group-addon">
<i class="fa fa-server"></i>
</div>
<input type="number" id="txtResltsPerPage" class="form-control" ng-model="pageSize" placeholder="Results per Page 10">
使用<div class="pull-right"></div>
,请参阅Docs有关帮助程序类浮动