[英]SumoSelect's select-all option overlaps other options in select drop down
I have a SumoSelect select drop down in my CodeIgniter
application and inside that the select all
option has smaller height as compared to other items, and due to this, select all
option overlaps other option in the drop down list.我的
CodeIgniter
应用程序中有一个SumoSelect select 下拉列表,其中select all
选项与其他项目相比具有较小的高度,因此, select all
选项与下拉列表中的其他选项重叠。 I have tried to increase the height of select-all
option element using jQuery
but I think the height of <option>
can not be modified manually.我尝试使用
jQuery
增加select-all
选选项元素的高度,但我认为<option>
的高度不能手动修改。 So please tell how to resolve this overlapping issue?那么请告诉我如何解决这个重叠问题?
Code:代码:
<select name="type" id="type" multiple="multiple" placeholder="Select a type" class="form-control SlectBox">
<?php foreach($types as $type) { ?>
<option>$type</option>
<?php } ?>
</select>
<script>
$(document).ready(function() {
window.asd = $('.SlectBox').SumoSelect({
csvDispCount: 3,
selectAll: 1,
captionFormat: '{0} types selected!',
captionFormatAllSelected:'All {0} types selected!'
});
<?php if(count(array_filter($Type_list))==0){?>
$('select.SlectBox')[0].sumo.selectAll();
<?php } ?>
});
</script>
Add this css class and adjust height and padding.form-group >.SumoSelect.open >.optWrapper>.select-all {height: 50px;padding: 6px 35px;}添加这个 css class 并调整高度和 padding.form-group >.SumoSelect.open >.optWrapper>.select-all {height: 50px;padding: 6px 35px;}
As a quick fix in Firefox, this solution worked for me.作为 Firefox 中的快速修复,此解决方案对我有用。 I added the following style to my css file for the page.
我在页面的 css 文件中添加了以下样式。
.SumoSelect .select-all {
display: table-cell;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.