2017-03-29 151 views
0
我有我的控件显示使用引导3.远低于100%的问题

这是一个例子:引导输入控制宽度太短

Screenshot

正如你所看到的,所有,但标签控制远比他们的容器短。使它成为Tokenfield后,标签开始全长显示。生成此代码是:

<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> 

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

+3

如果可能创建工作片段。 –

+0

你有没有.form-control类的输入? –

回答

1

如果产生从模板中检查该规则项目Content/Site.css

/* Set width on the form input elements since they're 100% wide by default */ 
input, 
select, 
textarea { 
    max-width: 280px; 
} 
+0

这是个问题。我不相信我没有看到。 – Lance