I’m trying to do this with the icon that is inside a label element.
Photoshopped:
What I am getting:
This is the code for that section
<div class="form-group col-6 m-0">
<label class="my-1 mr-2" for="role"><i class="fas fa-tag"></i> ROLE <span class="ml-auto"><i class="fas fa-question-circle"></i></span></label>
<select class="custom-select my-1 mr-sm-2 form-control r-0 light s-12" id="role">
<option value="1">Administrator</option>
</select>
</div>
In this span
element <span class="ml-auto"><i class="fas fa-question-circle"></i></span>
I have tried:
.ml-auto
.text-right
.d-flex .justify-content-end
.float-right
.pull-right
But none of those seem to work.
How can I get the i
element to float to the right as depicted in the photoshopped image?
3
Answers
Try and use the pull-right class
Add
d-flex
&align-items-center
classes to the<label>
, at which point.ml-auto
will work:Add d-flex and align-items-center classes on label