如何在@Html.TextAreaFor?
中垂直居中文本这是html
<table class="width100percent padding0Margin0">
<tr class="height35">
<td class="width150">
Description
</td>
<td class="textValignMiddle">
@Html.TextAreaFor(m => m.Job.Description, new { @class = "width646 height25", @placeholder = "Enter " + @Model.GetNameJob + " description" })
</td>
</tr>
</table>
我试过跟随css,但我不需要它
.textBottom{vertical-align: text-bottom;}
.textTop{vertical-align:text-top;}
.textVerticalAlignTop{vertical-align:top;}
.textBaseLine{vertical-align:baseline; }
.textValignBottom{vertical-align:bottom;}
.textValignMiddle {vertical-align: middle;}
唯一的方法是添加padding-top,然后缩小文本框的大小?
答案 0 :(得分:0)
请关注此css ...
.textValignMiddle
{
vertical-align:middle;
display: table-cell;
float: none;
}