表填充顶部

时间:2017-05-25 01:33:20

标签: html css

在这种情况下,有谁知道如何将第一个td的内容放到td的顶部?我曾尝试过填充,边距和其他任何东西,但它不起作用。



  <table>
    <tr>
    <td>AuthRequest</td>
    <td>when specifying an account, one of <password> or <preauth> must be specified. See preauth.txt for a discussion of preauth.
    An authToken can be passed instead of account/password/preauth to validate an existing auth token. If {verifyAccount}="1", <account> is required and the account in the auth token is compared to the named account.
    Mismatch results in auth failure. An external app that relies on ZCS for user identification can use this to test if the auth token provided by the user belongs to that user. If {verifyAccount}="0" (default), only the auth token is verified and any <account> element specified is ignored. </td>
    </tr>
    </table>
&#13;
&#13;
&#13;

enter image description here

2 个答案:

答案 0 :(得分:2)

你走了!使用vertical-align属性。

  <table>
    <tr>
    <td style="vertical-align:top">AuthRequest</td>
    <td>when specifying an account, one of <password> or <preauth> must be specified. See preauth.txt for a discussion of preauth.
    An authToken can be passed instead of account/password/preauth to validate an existing auth token. If {verifyAccount}="1", <account> is required and the account in the auth token is compared to the named account.
    Mismatch results in auth failure. An external app that relies on ZCS for user identification can use this to test if the auth token provided by the user belongs to that user. If {verifyAccount}="0" (default), only the auth token is verified and any <account> element specified is ignored. </td>
    </tr>
    </table>

答案 1 :(得分:0)

如果您正在查看将其保留在两列中,请使用Felix的代码,如果您希望将其放在第一个td之上,那么您可以将其放在一行中。

&#13;
&#13;
 <table>
    <tr>
    <td>AuthRequest</td>
    </tr>
    <tr>
    <td>when specifying an account, one of <password> or <preauth> must be specified. See preauth.txt for a discussion of preauth.
    An authToken can be passed instead of account/password/preauth to validate an existing auth token. If {verifyAccount}="1", <account> is required and the account in the auth token is compared to the named account.
    Mismatch results in auth failure. An external app that relies on ZCS for user identification can use this to test if the auth token provided by the user belongs to that user. If {verifyAccount}="0" (default), only the auth token is verified and any <account> element specified is ignored. </td>
    </tr>
    </table>
&#13;
&#13;
&#13;