Here is a simple html code from my ASP .NET MVC 5 project:
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
<div class="form-horizontal">
<div class="form-group">
@Html.TextBoxFor(model => model.Description, htmlAttributes: new { @class = "col-md-12", style = "Width:1000px" })
</div>
<div class="form-group">
<div class="col-md-12">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
}
I am trying to get a text box that is wide. However, no matter what I try for the width value, the text box width stays small.
I moved from EditorFor to TextBoxFor hoping I will have better control of width:-(.
Please help me understand what is it that I am missing? Regards.
style = ""with@style = "width:400px;"