How can I vertically center text in a @Html.TextAreaFor?
Here is the 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>
I have tried to following css but nothing is how I need it
.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;}
Is the only way to do this add padding-top then downsize the size of the textbox?
Please Following this css...
.textValignMiddle
{
vertical-align:middle;
display: table-cell;
float: none;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.