I want to put the floating label just like this:
The normal behaviour would be this but the input area is way to big for my purpose.
I don't have an idea how to set this up. For Bootstrap 4 there was an extra framework but this won't work with V5.
Thanks in advance!
You can overwrite the corresponding bootstrap 5 css class:
.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label,
.form-floating>.form-select~label {
opacity: .65;
transform: scale(.85) translateY(-.5rem) translateX(.15rem);
}
Set translateY(-.5rem) to -2rem or -20px or whatever fit's your layout. You can also set background: white;