How to adjust the alignment of placeholder text in input box?
Try this out
::-webkit-input-placeholder {
text-align:center;
}
:-moz-placeholder { /* Firefox 18- */
text-align:center;
}
::-moz-placeholder { /* Firefox 19+ */
text-align:center;
}
:-ms-input-placeholder {
text-align:center;
}
If you're wanting a multi-line input field you should use the textarea
element.
<li>
<textarea placeholder="Message"></textarea>
</li>
You can then style this however you like using the textarea
selector:
#message input,
#message textarea {
width: 250px;
height: 40px;
padding: 10px;
}
#message li input[type=text],
#message li textarea {
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border: none;
}
#message li textarea {
height: 150px;
resize: none;
}
JSFiddle demo.
To style placeholder text, you'll need vendor prefix CSS properties.
::-webkit-input-placeholder {
color: red;
}
:-moz-placeholder { /* Firefox 18- */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
}
:-ms-input-placeholder {
color: red;
}
Read this document
Updated:
In your case you use input box instead of using text-area. So if you want to move your text on top use a text-area instead of using input
.