Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap-select align only text right

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&nbsp;&nbsp;&nbsp;</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!

like image 887
Elie Morin Avatar asked Oct 17 '25 01:10

Elie Morin


1 Answers

for that, you should custom your CSS, so add the following style:

.bootstrap-select.btn-group .btn .filter-option {
   text-align: right   
}
like image 78
silviomoreto Avatar answered Oct 21 '25 05:10

silviomoreto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!