cannot create floating labels
hayate opened this issue · comments
Andrea Belvedere commented
It seems impossible to create a bootstrap form with floating labels as shown below because:
- when using the
bootstrap_field
tag only, the label is rendered before the input tag, this breaks floating labels - when using separate
bootstrap_field
andbootstrap_label
tags, the input field is wrapped in a div that breaks floating labels.
<div class="form-floating mb-3">
<input type="email" class="form-control" id="floatingInput" placeholder="Username">
<label for="floatingInput">Email address</label>
</div>
<div class="form-floating">
<input type="password" class="form-control" id="floatingPassword" placeholder="Password">
<label for="floatingPassword">Password</label>
</div>
Cleiton de Lima commented
@hayate Hi
I think floating labels is from bootstrap 5, right?
Andrea Belvedere commented
@CleitonDeLima sorry for the late reply. I am not sure, I rarely venture into the front-end. It's possible that they were not in the previous version of bootstrap.
Dylan Verheul commented
No further changes are expected on this project. See README.md (#964 ).