Here is my css:
.editor-field textarea {
width : 400;
height : 100px;
}
Here is the markup from my view:
&l
Code:
@Html.TextAreaFor(m => m.Message, 30, 10, new { @class = "what" })
You left off px
:
.editor-field textarea {
width : 400px;
height : 100px;
}
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.
After some time searching for it, the best way is to use one of the overloads of the method TextAreaFor()
@Html.TextAreaFor(model => model.Visit.BehavioralObservations, 10, 40, new { HtmlAttributes = new { } })
The 10 is the number of rows, the 40 is the number of columns
style can be specified in the link will
@Html.TextAreaFor(model => model.values, new {style = "width: 700px; height:200px;"})
ASP MVC
default project has site.css
with
max-width:280
for textarea
-- remove that and try something like this
@Html.TextAreaFor(model => model.ComicText, new { style = "width: 700px; height:150px;" })