Twitter Bootstrap:如何在.form-inline中设置表单字段的宽度?

时间:2015-02-27 00:13:42

标签: css css3 twitter-bootstrap twitter-bootstrap-3

如何在.form-inline内更广泛地输入文字输入字段?我似乎无法可靠地使用.row.col-md-*等。我只需要将文本输入更宽广。这是我的代码段:http://www.bootply.com/ddGvJH99Ud

<div class="container-fluid">
    <div class="row well">
        <div class="col-xs-12 col-sm-12 col-md-11 col-md-offset-1">
            <form class="form-inline">

                <div class="form-group">
                    <label for="search-domain">Search</label>
                    <select class="form-control" name="search-domain" id="search-domain">
                        <option value="books">
                            Books
                        </option>
                    </select>
                </div>

                <!-- START: Book Search Fields -->
                <div class="form-group search-books">
                    <label for="search-books-keywords">for</label>
                    <input type="text" class="form-control" placeholder="e.g.: title, author, ISBN, or keywords..." name="search-books-keywords" id="search-books-keywords">
                </div>
                <!-- END: Book Search Fields -->

                <button class="btn btn-success" type="button">Go</button>

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

1 个答案:

答案 0 :(得分:2)

您可以为输入设置规则,如:

#search-books-keywords {
  width:500px;
}

<强> bootply example