text-align: right; only for placeholder?

Me hdi picture Me hdi · Jul 18, 2011 · Viewed 79.1k times · Source


how can active text-align: right; only for placeholder?

<input type="text" name="airline_search" style="direction: ltr;  border: none;" placeholder="ارلاین">

i want use of direction: ltr; for text(that typed to inpute), and text-align: right; for placeholder.

Answer

Hnatt picture Hnatt · Jul 18, 2011
/* webkit solution */
::-webkit-input-placeholder { text-align:right; }
/* mozilla solution */
input:-moz-placeholder { text-align:right; }