I have the following line in my view:
<div class="editor-field">
<%= Html.TextBoxFor(m => m.Description)%>
</div>
How do I define the width of the text box?
I have the following line in my view:
How do I define the width of the text box? |
|||
|
A reusable solution is to set the width in your css file
then set it using the markup above
|
|||
|
This worked for me for the one-offs, pretty verbose though:
|
|||
|
You can attach it as an attribute. Try this:
|
|||||||||||
|
You can do also like this
|
|||
|
To me it worked by adding the "input" in the CSS for @Html.TextBoxFor: CSS:
For:
|
|||
|