Reputation: 3999
My code:
<div>
<input type="textarea">
</div>
How can I align text to the horizontal center and vertical top of the textarea?
Upvotes: 1
Views: 286
Reputation: 1344
Just put,
HTML
<textarea>some words</textarea>
CSS
textarea
{
text-align:center;
}
Upvotes: 0
Reputation: 3059
Like Dave mentioned there is no supported type="textarea"
attribute for the input
field. I think you want <textarea>
like this:
<textarea class="alignCenter"></textarea>
.alignCenter {
text-align:center;
}
Fiddle link: http://jsfiddle.net/Jt34H/
Upvotes: 5
Reputation: 742
The styling of a Text-area is very limited. You could try us this openWYSIWYG
Upvotes: 0