0

我有标签/输入字段为form-inline. 标签文本已被换行,以便可以对齐表单字段。但是当标签被包装时,它对应的输入字段正在垂直调整。我该如何解决?
HTML

<div class="row-fluid show-grid">
                <div class="span6 form-inline"><label class="pocLabel">First Name:</label><input type="text" required/></div>
                <div class="span6 form-inline"><label class="pocLabel">Middle Initial:</label><input type="text"  /></div>
            </div>
<div class="row-fluid show-grid">
                <div class="span6 form-inline"><label class="pocLabel">How long with current employer</label><input type="text"/></div>
                <div class="span6 form-inline"><label class="pocLabel">Middle Initial:</label><input type="text"/></div>
            </div>
            <div class="row-fluid show-grid">
                <div class="span6 form-inline"><label class="pocLabel">Last Name:</label><input type="text"/></div>
                <div class="span6 form-inline"><label class="pocLabel">Social Security Number:</label><input type="text"/></div>
            </div>

CSS

.col1 .col2 {
    width: 48%;
    word-wrap:break-word;
}

    label.pocLabel {
        width: 200px;

    }
    .show-grid [class*="span"] {
        text-align: left;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        min-height: 40px;
        line-height: 40px;
        margin-top: 10px;
        display: inline;
    }

在此处输入图像描述

4

1 回答 1

0

尝试放置垂直对齐:中间;标签上。

于 2013-07-16T22:17:46.357 回答