zostera / django-bootstrap3

Bootstrap 3 integration with Django.

Home Page:http://django-bootstrap3.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot create floating labels

hayate opened this issue · comments

It seems impossible to create a bootstrap form with floating labels as shown below because:

  1. when using the bootstrap_field tag only, the label is rendered before the input tag, this breaks floating labels
  2. when using separate bootstrap_field and bootstrap_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 ).