text-align: right; only for placeholder?

It's better to set CSS style for placeholder as @Hnatt mentioned. I used it with setting direction and the complete list of the selector for known browsers as below:

::-webKit-input-placeholder { /* WebKit browsers */
    direction: rtl;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
    direction: rtl;
}
::-moz-placeholder { /* Mozilla Firefox 19+ but I'm not sure about working */
    direction: rtl;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
    direction: rtl;
}
 

Hope this help.


/* webkit solution */
::-webkit-input-placeholder { text-align:right; }
/* mozilla solution */
input:-moz-placeholder { text-align:right; }

As of year 2020, CSS selector ::placeholder is supported in all major browsers except Internet Explorer:

input::placeholder {
    text-align: right;
}

Edge requires vendor prefix:

input::-webkit-input-placeholder {
    text-align: right;
}

Sources: Can I use, MDN


Or try it with a :focus event:

input[type='text']{
text-align:right;
}

input[type='text']:focus{
text-align:left;
}

This way, any placeholder even hard-coded will be held on right, and any text you type when focused will be on right. On the other hand, when you lose the focus, the alignement becomes right again.