2014-09-22 25 views
0

我到目前为止设置了以下内容jsFiddle。我希望减小输入框的大小,以便为可能存在或不存在的另一个输入框留下空间。减少表单组中的输入大小

根据用户放置在Cost Code框中的内容,可能出现在右侧的输入框会动态显示,所以我正在寻找一种解决方案,无论该输入是否存在都可以工作。但是我很难做到这一点。

回答

2

在表单组div上粘贴col-xs-6类。还要确保它周围有一个row的div。

<div class="row"> 
    <div class="form-group col-xs-6"> 
     <input type="number" class="form-control" id="create-enter-code1" placeholder="Cost Code"> 
    </div> 
<!-- insert another div here --> 
</div> 
+1

巢'COL-XS-3' DIV中的'形式,group'。像这样:http://jsfiddle.net/sq9Xy/23/ – RobbieP 2014-09-22 21:00:38

+0

你删除了你的第二个问题,但我希望帮助 – RobbieP 2014-09-22 21:04:14

0

在你的样式表:

#create-enter-code1{ 
    width:50%; 
}