Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set ion-select component with 100% width in IONIC 2

Tags:

I would like to set my ion-select with 100% of width.

I have tried with css class like this:

.mySelect { width: 100% !important; }

But it is not working.

like image 321
Luis Antonio Pestana Avatar asked Jul 27 '16 20:07

Luis Antonio Pestana


People also ask

How do you use ion select option?

Selects are form controls to select an option, or options, from a set of options, similar to a native <select> element. When a user taps the select, a dialog appears with all of the options in a large, easy to select list. A select should be used with child <ion-select-option> elements.


1 Answers

I did it.

For someone who wants the solution, here is the code:

.myCustomSelect{
  max-width: 100% !important;
}

You must have to override the 'max-width' css property.

like image 117
Luis Antonio Pestana Avatar answered Oct 08 '22 01:10

Luis Antonio Pestana