I want to add a 1px border to the select box ( md-select ) of angular material.
How do I do it using CSS?
In latest angular versions, md-select is renamed as mat-select and to add border to mat-select, you can use mat-form-field in your html file as follows:
<mat-form-field appearance="outline">
<mat-select placeholder="Select your option">
<mat-option *ngFor="let option of options" [value]="option">
{{option}}
</mat-option>
</mat-select>
</mat-form-field>
Here appearance="outline", will add border to the select box.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With