html – Displat 2 inputs in the same line


I have this code :

<mat-form-field>
  <div fxFlex="50%">
     <input
        matInput
        formControlName="field1"
        required
        type="number"
        min="0"
     />
     <span matSuffix>h</span>
  </div>
  <div fxFlex="50%">
     <input
        matInput
        formControlName="field2"
        required
        type="number"
        min="0"
     />
     <span matSuffix>min</span>
  </div>
  <mat-icon matSuffix>access_time</mat-icon>
  <mat-error>Required</mat-error>
</mat-form-field>

The display is like this :

enter image description here

I want to put all items in one line, I tried with display block, inline-block, but is not working as expected. Have you an idea ?



Source link

Latest articles

Related articles

Leave a reply

Please enter your comment!
Please enter your name here