如何使用引导程序增加ASP.NET Web表单中TextArea的长度

问题描述

我的aspx页面上有这样的代码

<div class="container">

        <h3 class="my-5 h2">Tasks List</h3>


        <div class="form-group w-75">
                <label for="lastmonth">Enter Tasks:</label>
                <textarea class="form-control" id="lastmonth" rows="7"></textarea>
          </div>

    </div>

但是即使我输入或,文本区域也似乎没有变化。我想增加文本框以占据页面的3/4。现在,它只有1/4。我什至在Site.css中做了以下更改,但似乎没有更改。

input,select,textarea {
    max-width: 100%;
}

解决方法

您可以通过将cols和rows设置为属性而不是使用bootstrap来轻松实现

尝试一下:

<textarea class="form-control" id="lastmonth" cols="30" rows="10"></textarea>

我附上屏幕截图供您参考:

enter image description here