Подтвердить что ты не робот

Межгрупповой формат

Я хотел бы иметь некоторый интервал между элементами управления. Согласно спецификации, это должно быть достигнуто с использованием класса группы форм. Однако он не работает в моем случае.

http://jsfiddle.net/TLF4L/

<div class="col-xs-12 col-sm-12">
    <form role="form">
        <div class="form-group">
            <div class="col-xs-3 text-right">
            <label for="cpTitle">Title</label>
            </div>
            <div class="col-xs-9">
                <input type="text" class="form-control" placeholder="Title of the program" id="cpTitle" />
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-3 text-right">
            <label for="cpDesc">Description</label>
            </div>
            <div class="col-xs-9">
                <textarea class="form-control" rows="3" placeholder="Description of the program" id="cpDesc"></textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-3 text-right">
                <label for="cpAddr">Program address</label>
            </div>
            <div class="col-xs-9">
                <input type="text" class="form-control" placeholder="Name of Facility" id="cpAddr" />
                <input type="text" class="form-control" placeholder="Street 1" />
                <input type="text" class="form-control" placeholder="Street 2" />
                <div class="col-xs-4">
                    <input type="text" class="form-control" placeholder="State" />
                </div>
                <div class="col-xs-4">
                    <input type="text" class="form-control" placeholder="City" />
                </div>
                <div class="col-xs-4">
                    <input type="text" class="form-control" placeholder="Zip" />
                </div>
            </div>
        </div>
    </form>
</div>
4b9b3361

Ответ 1

http://jsfiddle.net/TLF4L/6/

Основная проблема - убедиться, что вы устанавливаете класс "форма-горизонтальный" в своей форме. Для полей адреса программы вы можете либо указать отдельную строку для каждого, либо то, что я предлагаю, это просто добавить css для margin-bottom в каждом поле ввода. Отредактировано jsfiddle выше

.margin-bottom {
margin-bottom:15px;}



<div class="col-xs-12 col-sm-12">
<form role="form" class='form-horizontal'>
    <div class="form-group">
        <div class="col-xs-3 text-right">
            <label for="cpTitle">Title</label>
        </div>
        <div class="col-xs-9">
            <input type="text" class="form-control" placeholder="Title of the program" id="cpTitle" />
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-3 text-right">
            <label for="cpDesc">Description</label>
        </div>
        <div class="col-xs-9">
            <textarea class="form-control" rows="3" placeholder="Description of the program" id="cpDesc"></textarea>
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-3 text-right">
            <label for="cpAddr">Program address</label>
        </div>
        <div class="col-xs-9">
            <input type="text" class="form-control margin-bottom" placeholder="Name of Facility" id="cpAddr" />
            <input type="text" class="form-control margin-bottom" placeholder="Street 1" />
            <input type="text" class="form-control margin-bottom" placeholder="Street 2" />
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-3 text-right">&nbsp;</div>
        <div class="col-xs-3">
            <input type="text" class="form-control" placeholder="State" />
        </div>
        <div class="col-xs-3">
            <input type="text" class="form-control" placeholder="City" />
        </div>
        <div class="col-xs-3">
            <input type="text" class="form-control" placeholder="Zip" />
        </div>
    </div>
</form>

Ответ 2

Я обновил вашу скрипку, добавил класс textarea. Обновлено fiddle

Вам нужно использовать CSS, чтобы установить нижнюю границу поля в поля ввода

input[type=text], .txtarea{
margin-bottom: 10px;

 }