How to change the width of a fixed ion-label

What is the right way to change the width of a fixed ion-label?

I have a form with:

<ion-item>
  <ion-label fixed>Fairly long label bla</ion-label>
</ion-item>

I tried to increase the with of the label, because it gets truncated to 100px on the screen:

ion-item {
  ion-label {
    flex: 0 0 200px;
    width: 200px;
  }
}

Why do these styles seem to be ignored?

For what it’s worth, I ran into the same issue (RC4) and found the label adjusted to the size of my label content only after I removed ‘fixed’.

2 Likes

not sure, but this works for me:

<ion-label fixed class='fixedLabel'>E-mail: </ion-label>
    .fixedLabel {
        min-width: 20% !important;
        max-width: 20% !important;
    }
7 Likes

Thanks. This works :slight_smile:

1 Like

Thanks this actually works.

thank you bro :heart_eyes: :star_struck: