1

私は3つのテーブルを持っています。それらがすべてデータ(10行)で満たされている場合、それらは正常に見えます。写真を見る ここに画像の説明を入力してください

ただし、最大容量(つまり、10行)に達していない場合、テーブルは中央に配置されます。 ここに画像の説明を入力してください

最初の写真のように上部の配置と下部のボタンを維持したいと思います。これを行うための簡単なスタイルはありますか?私のHTMLは次のようになります

<table width="100%">
    <tr>
        <td>
            <table id="SomeTableContainer">
                <tr>
                    <th>Name</th>
                </tr>
            </table>
            <button id="prev1"><<</button>
            <button id="next1">>></button>
            <button id="create1">Create</button>
        </td>
        <td>
            <table id="SomeOtherTableContainer">
                <tr>
                    <th>Name</th>
                </tr>
            </table>
            <button id="prev2"><<</button>
            <button id="next2">>></button>
            <button id="create2">Create</button>
        </td>
        <td>
            <table id="OtherTableContainer">
                <tr>
                    <th>Name</th>
                </tr>
            </table>
            <button id="prev3"><<</button>
            <button id="next3">>></button>
        </td>
    </tr>
</table>
4

4 に答える 4

0

こんにちは今tdを追加します valign="top"

このように

<td valign="top">

またはで使用

css

td{
vertical-align:top;
}
于 2012-09-17T11:29:47.920 に答える
0

これを最初のTRに追加するだけです。

<tr valign="top"></tr>
于 2012-09-17T11:30:39.993 に答える
0

スタイルを追加

td { vertical-align: top;}
于 2012-09-17T11:31:22.677 に答える
0

これを試して

<td valign="top">
                <table id="SomeOtherTableContainer">
                    <tr>
                        <th>Name</th>
                    </tr>
                </table>
                <button id="prev2"><<</button>
                <button id="next2">>></button>
                <button id="create2">Create</button>
            </td>
于 2012-09-17T11:32:30.953 に答える