FernandoPaiva
FernandoPaiva

Reputation: 4462

Fill a column with input?

I'm trying to fill a column with an input text but it doesn't fill in.

How could I do this ?

<div class="col-md-6">        
        @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "formLogin" })){
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true)
        <div class="panel panel-red">
            <div class="panel-heading bg-red">Acesso</div>

                <div class="alert-success" id="errorMessage" style="display:none;margin:5px 5px 5px 5px;"></div>

                <div class="panel-body">
                    <!--Form-->
                    <div class="form-group">
                        <label for="email" class="cols-sm-2 control-label">Email <img src="~/Imagens/required.png" height="6" width="6"></label>
                        <div class="cols-sm-12">
                            <div class="input-group input-group-lg">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-envelope" aria-hidden="true"></i></span>
                                @Html.TextBoxFor(model => Model.email, new { Class = "form-control input-lg", placeholder = "Informe o email", maxlength = 255 })
                            </div>
                            @Html.ValidationMessageFor(model => model.email)
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="password" class="cols-sm-2 control-label">Senha <img src="~/Imagens/required.png" height="6" width="6"></label>
                        <div class="cols-sm-12">
                            <div class="input-group input-group-lg">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-lock" aria-hidden="true"></i></span>
                                @Html.PasswordFor(model => Model.password, new { Class = "form-control input-lg", placeholder = "Informe a senha", maxlength = 8 })
                            </div>
                            @Html.ValidationMessageFor(model => model.password)
                        </div>
                    </div>

                    <div class="form-group">                        
                        @Html.CheckBoxFor(model => Model.keepLogin) 
                        <label for="keepLogin" class="control-label">Me mantenha conectado</label>  
                    </div> 

                </div>                   
            <div class="panel-footer">                
                <button type="submit" id="btnSubmit" class="btn btn-success btn-block btn-lg">Acessar</button>
            </div>

        </div>
        }
    </div>

enter image description here

Upvotes: 1

Views: 709

Answers (1)

Mr Slim
Mr Slim

Reputation: 1468

In the Visual Studio default Bootstrap template, there is a file named \Content\Site.css

This file overrides Bootstraps behavior for input, select and textarea control and sets the max-width: 280px

Commenting this out should make your controls use the full space.

The following video should help Twitter Bootstrap & ASP.NET MVC -- Intro / Quickstart with Ben Cull

Upvotes: 1

Related Questions