垂直与我投入对齐(Vertical align with my inputs)

2019-10-21 17:40发布

我试过的事情,我已经看到了互联网上,但没有什么工作,我不知道为什么..

我已经与我的标签/输入垂直对齐的问题:

还有就是代码:

<!-- in <form> tag -->
<fieldset> 
    <legend style="font-family:'Helvetica Neue', sans-serif;">General info</legend>

    <div class="row form-group pagination-centered">
        <div class="form-horizontal">
            <div class="col-sm-3 col-md-3 col-lg-3">
            </div>
            <div class="col-sm-6 col-md-6 col-lg-6">
                <div class="col-sm-4 col-md-4 col-lg-4">
                    <label class="control-label pull-right">Platform :</label>
                </div>
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <label class="radio-inline"> <input type="radio" name="plat" id="plat1" value="plat1" checked> plat1 </label>
                </div>
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <label class="radio-inline"> <input type="radio" name="plat" id="plat2" value="plat2"> plat2 </label>
                </div>
            </div>
        </div>
    </div>

    <div class="row form-group pagination-centered">
        <div class="form-horizontal">
            <div class="col-sm-3 col-md-3 col-lg-3">
            </div>
            <div class="col-sm-6 col-md-6 col-lg-6">
                <div class="col-sm-4 col-md-4 col-lg-4">
                    <label for="version" class="pull-right">Version :</label>
                </div>
                <div class="col-sm-8 col-md-8 col-lg-8">
                    <select id="version" name="version" class="form-control text-center">
                    </select>
                </div>
            </div>
        </div>
    </div>

    <!-- more selects and more inputs -->
</fieldset>
<!-- more elements then end </form> -->

我试过形式垂直和出头的样子,没有结果。

在其他的话题,我已经看到了这一点:

   label, input {
    display: inline-block;
    vertical-align: baseline;
    width: 125px;
}

label {
    color: #2D2D2D;
    font-size: 15px;
}

form, input {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

但是,当我把这个在我的CSS没有happends ..

哪里是我的错?

多谢你们。

文章来源: Vertical align with my inputs