I'm currently developing an Angular form with multiple label-input field combinations. I have managed to style the labels and input fields with inline block so that they appear on the same row. However, I am facing a challenge in aligning the label to the far left and the input field control to the far right. I have tried making some CSS changes but have not been successful so far. Any assistance would be greatly appreciated.
.input-w label, .input-w select {
float:none;
display: inline-block;
vertical-align: middle;
}
.label {
padding: 0.21em 0.4em 0.2em;
box-shadow: none;
}
<form [formGroup]="myForm">
<div class="row">
<div class="col">
<div class="input-w label">
<label for="dropdown1" class="form-inline">Options: </label>
<select formControlName="dropdown1" class="form-control form-line">
<option *ngFor="let option of Options"
[ngValue]="option.value">
{{option.display}}
</option>
</select>
</div>
</div>
</div>
</form>