jeudi 11 juin 2015

Space between rows in bootrap form not correct

I have the following form, however there is an extra space between 1st and 2nd row.

http://ift.tt/1FbN9vr

However I am not sure how to get rid of it.

This is the html code generated

<div class="form-horizontal">



        <div class="form-group">
            <label class="control-label col-md-2" for="Entidad">Entidad</label>
            <div class="col-md-10">
                <select name="Entidades" class="form-control m-b" id="Entidades"></select>
            </div>
        </div>


        <div class="form-group">
            <label class="control-label col-md-2" for="Codigo">Codigo</label>
            <div class="col-md-10">
                <input name="Codigo" class="text-box single-line" id="Codigo" type="text" value="">
                <span class="field-validation-valid" data-valmsg-replace="true" data-valmsg-for="Codigo"></span>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-md-2" for="Nombre">Nombre</label>
            <div class="col-md-10">
                <input name="Nombre" class="text-box single-line" id="Nombre" type="text" value="">
                <span class="field-validation-valid" data-valmsg-replace="true" data-valmsg-for="Nombre"></span>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-md-2" for="TipoDeDatos">TipoDeDatos</label>
            <div class="col-md-10">
                <input name="TipoDeDatos" class="text-box single-line" id="TipoDeDatos" type="text" value="">
                <span class="field-validation-valid" data-valmsg-replace="true" data-valmsg-for="TipoDeDatos"></span>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input class="btn btn-primary" type="submit" value="Create">
                <a class="btn btn-white" href="/GlobalAdmin/Propiedades">Cancel</a>
            </div>
        </div>
    </div>

and this is my mvc code view

@model Inspinia_MVC5.Areas.GlobalAdmin.Models.Propiedad

@{
    ViewBag.Title = "Create";
    Layout = "~/Areas/GlobalAdmin/Views/Shared/_LayoutGlobalAdmin.cshtml";
}

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-4">
        <h2>Create</h2>
        <ol class="breadcrumb">
            <li>
                @Html.ActionLink("List", "Index")
            </li>
            <li class="active">
                <strong>Create</strong>
            </li>
        </ol>
    </div>
    <div class="col-sm-8">
        <div class="title-action">
            @Html.ActionLink("Back to List", "Index", null, new { @class = "btn btn-primary"})
        </div>
    </div>
</div>


<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>Create Propiedad</h5>
                </div>
                <div class="ibox-content">

                @using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        @Html.ValidationSummary(true)


        <div class="form-group">
            @Html.LabelFor(model => model.Entidad, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("Entidades", (IEnumerable<SelectListItem>)ViewData["Entidades"], new { @class = "form-control m-b" })
            </div>
        </div>


        <div class="form-group">
            @Html.LabelFor(model => model.Codigo, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Codigo)
                @Html.ValidationMessageFor(model => model.Codigo)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Nombre, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Nombre)
                @Html.ValidationMessageFor(model => model.Nombre)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.TipoDeDatos, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.TipoDeDatos)
                @Html.ValidationMessageFor(model => model.TipoDeDatos)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-primary" />
                @Html.ActionLink("Cancel", "Index", null, new { @class = "btn btn-white"})
            </div>
        </div>
    </div>
}

                </div>
            </div>
        </div>
    </div>
 </div>

Aucun commentaire:

Enregistrer un commentaire