I am trying to center-align text elements in my Angular fluent-UI dropdown. I've tried using text-align and text-align-last, but no luck.
Here is the CSS:
.fluent-select {
text-align-last: center;
text-align: center;
min-width: 0;
flex: 1;
}
.fluent-select-option {
text-align: center;
text-align-last: center;
}
Here is the HTML:
<fluent-select
title="Please select here"
[(ngModel)]="mySelection"
(ngModelChange)="executeSelection()"
name="myChoice"
class="fluent-select"
ngDefaultControl
>
<fluent-option class="fluent-select-option">{{ mySelection }}</fluent-option>
<fluent-option
*ngFor="let choice of choices; let i = index"
[value]="choice.path"
>{{ choice.title }}</fluent-option>
</fluent-select>
I have tried using the CSS properties text-align: center and text-align-last: center, but no matter what I try the text is always aligned on the left.