0

私はこの例を持っています: フィドルリンク

display: table、display: table-cell、display: table-row を使用したテーブル

<p> の前に <span> タグを追加する必要がありますが、テーブル構造が壊れています。

何か案が?ありがとう

例:

<fieldset>
<span>
<p>
    <label>First Name: </label>
    <input type="text" />
</p>
</span>
<span>
<p>
    <label>Second Name: </label>
    <input type="text" />
</p>
</span>
<span>
<p>
    <label>Country: </label>
    <select>
        <option>Choose</option>
    </select>
</p>
</span>
<span>
<p>
    <label>Age: </label>
    <select>
        <option>Choose</option>
    </select>
</p>
</span>
</fieldset>
4

3 に答える 3

2

テーブルとして表示する場合は、すべての要素が同じ構造プロパティに従う必要があります

fieldset span {
    display: table-row-group;
}

フィドル: http://jsfiddle.net/qQ3xJ/

于 2013-08-28T12:18:27.717 に答える