align-text in ion-input Ionic 2
12,134
Solution 1
Inside of every ion-input
there's a input
, this input is what you need to style, just do the following:
ion-input {
input {
text-align: right;
/* IF YOU ALSO WANT TO PUSH PLACHEHOLDER TO THE RIGHT USE THE FOLLOWING, IF NOT JUST DELETE THE ::-webkit-input-placeholder*/
::-webkit-input-placeholder {
text-align: right;
}
}
}
Hope this helps.
Solution 2
ionic 3:
<ion-input text-center></ion-input>
Author by
Indra suandi
Updated on June 25, 2022Comments
-
Indra suandi almost 2 years
I have this html in ionic
<ion-label color="primary" stacked>Email</ion-label> <ion-input type="email" placeholder="Email Input"></ion-input>
how to make text input align-text in right side