首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >引导输入控制宽度太短

引导输入控制宽度太短
EN

Stack Overflow用户
提问于 2017-03-29 13:25:05
回答 1查看 1.9K关注 0票数 0

我的控件显示使用Bootstrap 3的比例远远低于100%,这是一个例子:

正如您所看到的,除了标记控件之外,所有这些控件都比它们的容器短得多。标记在使它成为Tokenfield之后开始显示完整的长度。生成此代码的代码是:

代码语言:javascript
运行
复制
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading clearfix">
                <b class="panel-title">Information</b>
                <a href="#" data-toggle="collapse" data-target="#Information" style="color: black;"><span id="InfoCollapseIcon"></span></a>
            </div>
            <div class="panel-body panel-collapse collapse in" id="Information">
                <div class="form-group">
                    @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label text-left col-md-4" })
                    <div class="col-md-8">
                        @Html.TextBoxFor(model => model.Name, htmlAttributes: new { @class = "form-control", @title = "The unique name of the generator." })
                        @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
                    </div>
                </div>

                <!-- Rinse and Repeat the above -->
            </div>
        </div>
    </div>
</div>

如何使控件填充其容器的宽度?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-03-29 14:21:49

如果从模板生成项目,请检查Content/Site.css中的此规则

代码语言:javascript
运行
复制
/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
} 
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43094856

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档