我在使用引导日期范围选择器下拉列表设置表单时遇到问题。
这是我想要的两个图像以及我的页面的样子:
这是我创建的表单代码:
<div class="form-group" style="border: 1px solid">
<div class="row">
<div class="radio">
<label><input type="radio" name="optradio">Select Period
</label>
</div>
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc;">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
<span></span> <b class="caret"></b>
</div>
</div>
<div class="row">
<div class="radio">
<label><input type="radio" name="optradio">Select Date</label>
</div>
</div>
<div class="row">
<div class="radio">
<label><input type="radio" name="optradio">Select Date Range</label>
</div>
</div>
</div>
答案 0 :(得分:1)
您可以使用col-md- *类引导程序
<div class="form-group" style="border: 1px solid">
<div class="row">
<div class="col-md-2">
<div class="radio">
<label><input type="radio" name="optradio">Select Period</label>
</div>
</div>
<div class="col-md-3">
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
<span></span> <b class="caret"></b>
</div>
</div>
</div>
<div class="row">
<div class="col-md-2">
<div class="radio">
<label><input type="radio" name="optradio">Select Date</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-2">
<div class="radio">
<label><input type="radio" name="optradio">Select Date Range</label>
</div>
</div>
</div>
</div>
答案 1 :(得分:0)
我只是在这里走出困境,如果你包括一个小提琴它会帮助你更容易,但我最初的猜测是你可能想要抛出你的内容form-group
成一排:
<div class="row">
<div class="col-12">
<div class="form-group" style="border: 1px solid">
<div class="row">
<div class="radio">
<label><input type="radio" name="optradio">Select Period
</label>
</div>
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc;">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
<span></span> <b class="caret"></b>
</div>
</div>
<div class="row">
<div class="radio">
<label><input type="radio" name="optradio">Select Date</label>
</div>
</div>
<div class="row">
<div class="radio">
<label><input type="radio" name="optradio">Select Date Range</label>
</div>
</div>
</div>
</div>
</div>