I am using Bootstrap for styling and created this input using the input form classes of Bootstrap
But for some reason some weird rounding between the label and the input space happens when loading the page.
It might have something todo with me using astro and made a component of this input but still no idea.
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Zeitpunkt des Aufhörens</span>
</div>
<input type="date" class="form-control" aria-describedby="basic-addon1">
</div>
2
Answers
Actually input-group-text class contain border-radius css in it by default so if you want to remove it just add one more class which is rounded-0. Please check below updated code :-
Let me know if it works for you or not.
The
input-group-prepend
class is a Bootstrap 4 class. Remove the<div class="input-group-prepend">
element and the problem will be gone.Note that you can use multiple elements with
input-group-text
in the same input group and they will be styled accordingly. You don’t need any additional CSS or classes.The migration guide has a note about that change.