How do I set the width and height of a textarea using CSS?

前端 未结 6 438
夕颜
夕颜 2021-01-17 07:42

Here is my css:

.editor-field textarea {
    width : 400;
    height : 100px;
}

Here is the markup from my view:

        &l         


        
6条回答
  •  清歌不尽
    2021-01-17 08:23

    try to use TextAreaFor helper method and set cols and rows html property

    Sample

    @Html.TextAreaFor(model=>model.MyMultilineText, new {rows="6", cols="10"})
    

    I Hope this help. Regards.

提交回复
热议问题