1

I'm having an issue getting the text in one of my input boxes to begin at the top of the input box. Instead, it is vertically centered. None of the other solutions on stackoverflow seemed to help.

I've recreated the issue here (ignore how bad the rest of the form looks ;): http://codepen.io/tim1017/pen/ofuhx

And here's the actual page it's located on: http://dev.longviewsources.com/contact/

Thanks!

4

3 回答 3

3

对于看起来像是要使用的多行文本,您可能想要使用<textarea>,而不是文本输入标签。

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

另请参阅:<input type="text" /> 中的多行输入

于 2013-08-27T23:38:07.603 回答
2

您正在使用应该使用 textarea 的输入。输入元素仅支持一行输入,因此它垂直居中该一行。这是一个工作叉:http ://codepen.io/anon/pen/LBvsd

于 2013-08-27T23:38:20.767 回答
0

更正和分叉你可以检查css和示例; 这里

于 2013-08-27T23:44:08.920 回答