twitter bootstrap 3 input-group-addon不是全部大小相同

J.P*_*Pip 51 css twitter-bootstrap

基本上我有几个输入字段,其前缀有一些文本.当我尝试在输入组插件和输入字段本身上设置col-lg-4和col-lg-8时,它不会按照我的预期执行操作并调整它们的大小.

<div class="input-group">
   <span class="input-group-addon">some text</span>
   <input type="text" class="form-control" id="current_pwd" name="current_pwd" />
</div>
Run Code Online (Sandbox Code Playgroud)

谁能帮助我让输入组插件获得相同的大小?

我在这里创造了一个小提琴:http://jsfiddle.net/Dzhz4/解释了我的问题.

有人可以解决一些问题吗?

Fal*_*hal 90

试试这个

http://jsfiddle.net/Dzhz4/1/

.input-group-addon {
    min-width:300px;// if you want width please write here //
    text-align:left;
}
Run Code Online (Sandbox Code Playgroud)


ric*_*ver 13

.input-group-addon { width: 50px; } // Or whatever width you want

.input-group { width: 100%; }
Run Code Online (Sandbox Code Playgroud)

第一部分设置插件的宽度,第二部分强制输入占用其所有父容器.