django-bootstrap3
django-bootstrap3 copied to clipboard
cannot create floating labels
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>
@hayate Hi I think floating labels is from bootstrap 5, right?
@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.
No further changes are expected on this project. See README.md (#964 ).