Twitter bootstrap 在Bootstrap3中的输入字段上设置maxwidth
我有一个带有标题的表,我想向标题添加输入,以允许人们在表上进行筛选。例如:Twitter bootstrap 在Bootstrap3中的输入字段上设置maxwidth,twitter-bootstrap,twitter-bootstrap-3,Twitter Bootstrap,Twitter Bootstrap 3,我有一个带有标题的表,我想向标题添加输入,以允许人们在表上进行筛选。例如: <table class="table table-condensed table-hover table-striped"> <thead> <tr> <th> Date Created <button id="btnToggleFilterDateCreated" class="btn btn-xs btn
<table class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th>
Date Created <button id="btnToggleFilterDateCreated" class="btn btn-xs btn-primary"><i class="fa fa-filter"></i></button>
<div class="dateRangePickers">
<div class="input-group date" id="dateCreatedStartFilterDiv">
<span class="input-group-addon datepickerbutton">
<span class="glyphicon glyphicon-calendar"></span>
</span>
<input type="text" id="dateCreatedStartFilter" size="10" maxlength="10" class="form-control" readonly="readonly" /><br/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-remove"></span>
</span>
</div>
<script type="text/javascript">
$(function () {
$('#dateCreatedStartFilterDiv').datetimepicker({ });
});
</script>
</div>
</th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
<thead>
<tbody>
...
<tbody>
</table>
创建日期
$(函数(){
$('#dateCreatedStartFilterDiv')。日期时间选择器({});
});
...
JSFIDLE
但是,一旦我应用引导类进行格式化,我的
maxwidth
就会被忽略,输入会将表列吹出。有没有办法告诉Bootstrap遵守输入的10个字符大小限制?我不确定我是否理解您的问题,但我认为您应该尝试重置输入和加载项的宽度,请参阅:
这可以通过使用以下CSS代码来实现:
.input-group .form-control, .input-group-addon, .input-group-btn {
width:initial;
}
我不确定我是否理解您的问题,但我认为您应该尝试重置输入和加载项的宽度,请参见:您可以将此添加为答案,以便我可以接受它吗?非常有效!谢谢