Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 垂直对齐输入并从不同行中选择_Html_Css_Twitter Bootstrap 3 - Fatal编程技术网

Html 垂直对齐输入并从不同行中选择

Html 垂直对齐输入并从不同行中选择,html,css,twitter-bootstrap-3,Html,Css,Twitter Bootstrap 3,我有简单的html: <div class="row"> <div class="col-md-4 pull-right"> <input type="text" class="form-control input-sm" /> </div> </div> <div class="row"> <div class="col-md-4 pull-right">

我有简单的html:

 <div class="row">

    <div class="col-md-4 pull-right">
        <input type="text" class="form-control input-sm" />
    </div>
</div>

<div class="row">
    <div class="col-md-4 pull-right">
        <select class="form-control input-sm">
            <option value="0">NEW</option>
            <option value="1">PROCESSING</option>
            <option value="2">SHIPPED</option>
            <option value="3">COMPLETED</option>
        </select>
    </div>
</div>

新的
处理
装船
完整的
但是,输入大于选择。你能解释一下为什么吗? 这是
注:我无法更改行。

请参见,在HTML中,输入字段具有内置的固定宽度。因此,您必须重写或使用css中的width属性来增加输入字段的大小。如果您想更改宽度,请告诉我。

这取决于选择框的值长度,我不擅长引导,但如果您想解决问题,您应该在代码中稍作更改:

select.input-sm {
    height: 30px;
    line-height: 30px;
    width: 100%;
}

.pull-right {
    float: right!important;
    width: 50%;
}

可能存在的副本