Is there a way to showcase multiple form input groups side by side using Bootstrap 5?
I attempted the following, but the input group components ended up stacking on top of each other:
<div class="container">
Your username is
<div class="input-group form-control-inline">
<span class="input-group-text">@</span>
<input type="text" class="form-control " placeholder="Username">
</div>
and your email <is></is>
<div class="input-group form-control-inline">
<input type="text" class="form-control form-control-inline" placeholder="">
<span class="input-group-text">@example.com</span>
</div>
</div>
.form-control-inline {
display: inline-block;
width: auto;
vertical-align: middle;
margin-top: -8px;
}
.form-control-inline.form-control, .form-control-inline.input-group-text {
display: inline-block;
}
Fiddle: https://jsfiddle.net/46se871g/