I'm trying to display 2 input fields and a button side by side. Tried many combinations, but still no luck. The code block of the and is below. Can you please help on how to make them on the same row ide by side. Thanks so much
Code:
<div [id]="id" class="row" style="margin: 0rem; align-items: center">
...
<ng-container [formGroup]="igf">
...
<div class="p-0">
...
<div class="input-group input-group-sm">
...
<ng-container>
...
<input> --first
<div class="input-group">
...
<input> --second
</div>
</ng-container>
</div>
</div>
</ng-container>
</div>
Option 1: No nested
input-groupapp.component.html
See live demo.
Option 2: Nested
input-groupIf you want to have a nested
input-group, then the following code will do the trick. Addstyle="display: inline-flex;"to the secondinput-group.The code below also works within
<ng-container>. See live demo.app.component.html
See live demo.