Bootstrap-select 仅右对齐文本 [英] Bootstrap-select align only text right
问题描述
我想将下拉列表的文本向右对齐,并将插入符号保持在他的位置.我有一个很长的表格,每个图标都在右边,所以不能移动carret.我发现如何获取右侧的选项,但所选的选项留在左侧.
我通过覆盖 js.min 来尝试解决问题,但我需要在其他位置左对齐其他下拉列表.所以我请求你的帮助.
有代码:
<label class="col-sm-4 control-label" for="pmtType">类型depaiement </label><div class="col-sm-8 input-group pad-btm pull-right"><select class="selectpicker" data="pull-right" data-style="text-right" id="pmtType" dir="rtl"><option class="text-right">Hebdomadaire</option><option class="text-right">Quinzaine</option><option class="text-right" selected>Mensuel</option></选择>
这是它的样子:实际
它应该是这样的:通缉
感谢您的帮助!
为此,您应该自定义 CSS,因此添加以下样式:
.bootstrap-select.btn-group .btn .filter-option {文本对齐:右}
I want to align the text of the dropdown to the right and keep the carret at his place. I got a long form and every icon are on the right, so moving the carret is not an option. I found how the get the option on the right, but the selected one stay on the left.
I try an issue by overriding the js.min, but I need to have other dropdown somewhere else left align. So I ask for your help.
There is the code:
<div class="form-group oa-vert-marg-2 pull-right">
<label class="col-sm-4 control-label" for="pmtType">Type de paiement </label>
<div class="col-sm-8 input-group pad-btm pull-right">
<select class="selectpicker" data="pull-right" data-style="text-right" id="pmtType" dir="rtl">
<option class="text-right">Hebdomadaire</option>
<option class="text-right">Quinzaine</option>
<option class="text-right" selected>Mensuel</option>
</select>
</div>
</div>
This is how it look: actual
This is how it should look: wanted
Thank you for helping!
for that, you should custom your CSS, so add the following style:
.bootstrap-select.btn-group .btn .filter-option {
text-align: right
}
这篇关于Bootstrap-select 仅右对齐文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!