Width does not increase more than 283px Bootstrap

Asked

Viewed 155 times

1

Hello, I have a form where I have one TextArea. But the Width is no more than 283px. When I decrease, it decreases correctly, now when I increase, it doesn’t work.

I set the size as 400px, however, when inspecting the code by Google, I see that I have only 283px.

Follows the form in question:

  <div class="container">
    <h4> Descriçao da Solicitação</h4>
    <div class="col-md-12">
        @Html.TextAreaFor(model => model.Descricao, new { @class = "form-control", style = "width:400px;", placeholder = "Digite a descrição de sua solicitação aqui" })
        @Html.ValidationMessageFor(model => model.sLotacao)
    </div>
    <br/><br/>
    <div class="form-group">
        <div>
            <input type="submit" value="Salvar" class="btn btn-success btn-lg" />
        </div>
    </div>
    <br />
    <h5> Requerido a concessão da vantagem assinada nos termos da legislação em vigor aplicável ao assunto.</h5>
</div>

How to proceed?

  • How does the TextArea in the code Html?

  • It is editable, but I can only change the height( dragging with the mouse), the width does not change.

1 answer

2


I reproduced your situation here in a test project and did not get the same error. Your form may be inheriting this width from some CSS or some jQuery function for example.

Anyway, the line below code can end up helping because of the attribute !important which I inserted next to the style statement.

        @Html.TextAreaFor(model => model.Descricao, new { @class = "form-control", @style = "width:400px !important", @placeholder = "Digite a descrição de sua solicitação aqui" })
  • With the ! Important also did not work. I will check the case of inheritance, to check and already put here.

  • @Renilsonandrade Your website is posted in some link?

  • 1

    That’s right. I was inheriting the Site.css file that MVC automatically creates. I changed the information in it, and it worked perfectly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.