Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

text-align: right; only for placeholder?


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.

like image 746
Me hdi Avatar asked Jul 18 '11 07:07

Me hdi


People also ask

Can you adjust the alignment of text within a placeholder?

Select the text you want to modify. Select one of the four alignment options in the Paragraph group. The alignment commands align the text within the placeholder or text box it is in, not across the slide.

How do I move placeholder text in CSS?

Change Input Placeholder Text with CSS You can use the ::placeholder pseudo-element to change the styles of the placeholder text, which includes the ability to change the background.

How do you give a placeholder text a margin?

Just add padding to the input like this: . tbsearchbar { padding-top: 10px; color: red; //To add some color. }


1 Answers

/* webkit solution */ ::-webkit-input-placeholder { text-align:right; } /* mozilla solution */ input:-moz-placeholder { text-align:right; } 
like image 82
Hnatt Avatar answered Sep 26 '22 02:09

Hnatt