Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Missing padding for floating label #177

Open
No1e opened this issue Mar 20, 2021 · 3 comments
Open

[Bug] Missing padding for floating label #177

No1e opened this issue Mar 20, 2021 · 3 comments

Comments

@No1e
Copy link

No1e commented Mar 20, 2021

Version

Latest

Reproduction link

https://youdonotneedexample.com

Operating System

Windows 10

Device

Browser & Version

Chrome - any

Steps to reproduce

The reproduction is very simple. Just use example from your documentation

Vorname
Nachname
### What is expected? When the input field is focused, it is expected that the floating label be horizontally aligned with input field. ### What is actually happening? Floating label is not aligned with input field (missing padding)

Solution

Additional comments

@groovemen
Copy link
Contributor

Hello @No1e,

Thank you for using our products and for letting us know about this issue. You have two use-cases for using the inputs label inside of a form:

  • .bmd-label-static is recommended for using with a placeholder for an input
<div class="form-group bmd-form-group">
  <label class="bmd-label-static">Fist Name</label>
  <input type="text" class="form-control" placeholder="Your name here">
</div>
  • .bmd-label-floating is recommended for using without the placeholder
<div class="form-group bmd-form-group">
  <label class="bmd-label-floating">Fist Name</label>
  <input type="text" class="form-control">
</div>

Hope that information helps you. Please let us know if we can help you with anything else.
Best,
Creative Tim Staff

P.S. Remember to wash your hands before coding!

@No1e
Copy link
Author

No1e commented Apr 24, 2021

Thank you for the reply, but I think you did not understood, what the problem is.
If the 'form-group' is wrapped in the 'row'
image
than the problem appears, as shown in the following figure
image

If its used without 'row'
image

Than its is shown correctly aligned with input field.
image

@groovemen
Copy link
Contributor

Hello again,

Sorry for the misunderstanding. You have encountered this issue because you have set the col-2 class on the form-control div.
So if you are trying to use the form-control into a row, you have to also wrap the div into a col (like Boostrap default structure):

<div class="row">
  <div class="col-4">
    <div class="form-group bmd-form-group">
      <label class="bmd-label-floating">Fist Name</label>
      <input type="text" class="form-control">
    </div>
  </div>
</div>

NOT like this:

<div class="row">
  <div class="form-group bmd-form-group col-4">
    <label class="bmd-label-floating">Fist Name</label>
    <input type="text" class="form-control">
  </div>
</div>

Please let us know if we can help with any other details.

Best,
Creative Tim Staff

P.S. Remember to wash your hands before coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants