0
votes

I would like to display the selected mat-option vertically centered in the mat-select. It seems like the control reserves some space in top for the label. So i tried to hide the label - with no sucess ...

<mat-form-field appearance="fill" [floatLabel]="'never'">

enter image description here

1

1 Answers

0
votes

In mat-form-field there is some space reserved on top of the input field for label. Hence, you are seeing some space there. For removing that blank space after hiding label you can change padding value for input field with help of the following css.

    .mat-form-field-appearance-fill .mat-form-field-infix {
        padding: 0 0 1.5em 0;
    }