The placeholder text in the third box appears in the middle while i want to be at the top. HTML
<div id="message">
<ul>
<li><h1>Send us a message</h1></li>
<li><input type="text" placeholder="Name"></li>
<li><input type="text" placeholder="Email"></li>
<li><input type="text" style="height:150px;" placeholder="Message"></li>
<li><a href="#">Send</a></li>
</ul>
</div>
Here is JSFiddle
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.
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 love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With