I need help with aligning a text label to the right using Bootstrap 5. Currently, when I use the following code:
<div class="form-floating text-dark text-end float-right">
<input type="password" class="form-control text-dark" placeholder=" " id="password">
<label for="floatingInput" class="float-right text-end">Password</label>
</div>
The text is aligned to the left, but I want it to be on the right.
I've tried using .text-end
and adding CSS code like:
.float-right {
float: right;
}
However, it's not working for me.