Reputation: 161
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
Upvotes: 3
Views: 12599
Reputation: 2973
<div class="topPedding">
<ion-item>
<ion-input type="text" placeholder="Username" text-center></ion-input>
</ion-item>
<ion-item>
<ion-input type="password" placeholder="Password" text-center></ion-input>
</ion-item>
<ion-item class="border-none" lines="none">
<ion-toggle color="primary"></ion-toggle>
<ion-label>Rem[![enter image description here][1]][1]ember Password</ion-label>
</ion-item>
<ion-button color="light" expand="block">Sign In</ion-button>
</div>
Upvotes: 0
Reputation: 6421
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.
Upvotes: 10