I have the following fiddle:
http://jsfiddle.net/q05n5v4c/2/
In Chrome, it renders just fine. The chevron is on the right side.
However, in Firefox, it
Change the order of the float, put it before the text like this:
<div class="btn-group">
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle"style="width: 400px;text-align: left;">
<span class="glyphicon glyphicon-chevron-down" style='float: right;'></span>
Checked option
</button>
</div>
http://jsfiddle.net/q05n5v4c/3/
Remove the float on the span, add position: absolute
to it and position it using top/right/bottom/left.
Note: .btn-group already have position: relative
from bootstrap.
HTML
<div class="btn-group">
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle" style="width: 400px;text-align: left;">
<span class="glyphicon glyphicon-chevron-down"></span>
Checked option
</button>
</div>
CSS
div.btn-group span {
position: absolute;
top: 7px;
right: 12px;
}
Here's a working fiddle.
It seems like the property white-space
is the cause of the issue. With the class btn
this property is:
white-space:nowrap
If you change that property works fine:
.btn {
white-space:normal
}
Check the Demo Fiddle
If you don't wish to reverse the order of your elements, you could float: left;
the first element.
Here is one more solution:
give style your span tag like this.
position:absolute;
right: 5px;
top : 9px