How to change the size of TextBoxFor ? I followed exactly that solution and it had no effect on my form: [ Defining a larger size for a TextBoxFor
The Bootstrap CSS file is being loaded before;
HTML:
@model Merc.Dominio.Entidade.Colaborador
@{
ViewBag.Title = "COLABORADOR";
Layout = "~/Areas/Administrativo/Views/Shared/_AdministrativoLayout.cshtml";
}
<style>
.form-control-custom {
width: 1000px;
}
</style>
<input type="hidden" id="hidColaboradorID" name="hidColaboradorID" value="@Model.ColaboradorID" />
<div class="row">
<div class="col-md-12">
<fieldset>
<legend>COLABORADOR - EDITAR</legend>
<fieldset>
<label><u>DADOS PESSOAIS:</u></label>
<div class="row">
<div class="col-md-8">
@Html.LabelFor(x => x.Nome)
@Html.TextBoxFor(x => x.Nome, new { @class = "form-control form-control-custom"})
</div>
<div class="col-md-2">
<label>CPF</label>
@Html.TextBoxFor(x => x.CPFCNPJ, new { @class = "form-control" })
</div>
<div class="col-md-2">
<label id="RG" name="RG">RG</label>
@Html.TextBoxFor(x => x.RG, new { @class = "form-control" })
</div>
</div>
</fieldset>
</fieldset>
</div>
</div