I'm translating a bootstrap form to a material one. In the following photo I want the mat-form-field to look like the second bootstrap input
But I can't get the label on top of matInput
I've tried this to use the for attribute in label tag:
<div class="form-group">
<label for="paysAdresse">Pays : </label>
<mat-form-field appearance="outline">
<mat-label>Pays :</mat-label>
<input matInput id="paysAdresse" formControlName="pays" placeholder="pays">
</mat-form-field>
</div>
<div class="form-group">
<label for="voieAdresse">Voie : </label>
<input id="voieAdresse" formControlName="voie" type="text" class="form-control form-control-sm" >
</div>
but it gives me the label and the input in the same line. how can I achieve the wanted result ?
KISS
. it can be easily achieved using CSS – Vikas