herve
herve

Reputation: 610

how to create a full width with no label select element in ionic?

In a form I would like to use a full width element. I don't need any label, is this possible?

This select is used to store a list of elements that are filled by a controller. I have tried without using a but it does not change anything.

Thanks

Upvotes: 0

Views: 999

Answers (1)

You just need to remove the tag and set the size with max-width: 100%; width: 100%.

<ion-item>
  <ion-select [(ngModel)]="selectModel" style="max-width: 100%; width: 100%">
    <ion-option value="c">Fist Item</ion-option>
    <ion-option value="e">Second Item</ion-option>
  </ion-select>
</ion-item>

Regards.

Upvotes: 1

Related Questions