TextAreaFor Cannot Set Width

前端 未结 5 1457
伪装坚强ぢ
伪装坚强ぢ 2021-02-07 06:24

I cannot set the width or cols in atextarea. Rows/Height works just fine. can someone please help thanks!

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken(         


        
5条回答
  •  走了就别回头了
    2021-02-07 06:35

    I had the same issue and found the following piece of CSS in my Site.css to be the cause (which I commented out).

    /* Set width on the form input elements since they're 100% wide by default */
    input,
    select,
    textarea {
        max-width: 280px;
    }
    

提交回复
热议问题