A field has a placeholder
:
<input type="text" name="clt_cin_pass" id="clt_cin_pass" maxlength="25" placeholder="CIN/Passeport" value="foo" />
How to place the placeholder
's text , here CIN/Passeport
, at the field's right ?
A field has a placeholder
:
<input type="text" name="clt_cin_pass" id="clt_cin_pass" maxlength="25" placeholder="CIN/Passeport" value="foo" />
How to place the placeholder
's text , here CIN/Passeport
, at the field's right ?
I have created a jsFiddle for you pheromix,
https://jsfiddle.net/69sp620q/1/
Html
<input type="text" name="clt_cin_pass" id="clt_cin_pass" maxlength="25" placeholder="CIN/Passeport" />
CSS
input[type='text']{
text-align:right;
}
Of course you can update this to target a class not just all input tags
/* webkit solution */
::-webkit-input-placeholder { text-align:right; }
/* mozilla solution */
input:-moz-placeholder { text-align:right; }
<input type="text" name="clt_cin_pass" id="clt_cin_pass" maxlength="25" placeholder="CIN/Passeport" value="" />