简体   繁体   中英

How do I align text in “top right”?

I have the following table.

<table>
    <tr>
        <td align="right">
            <b>Car Name:</b>
        </td>
        <td>
            <div><%=Model.DataMayLoad1%></div>
            <div><%=Model.DataMayLoad2%></div> 
            <div><%=Model.DataMayLoad3%></div>
            <div><%=Model.DataMayLoad4%></div>
        </td>
    </tr>
</table>

The "Car Name:" column is right aligned, but in the center. Is there a way to align that column to the top right corner?

<table>
    <tr>
        <td align="right" style="vertical-align: top;">
            <b>Car Name:</b>
        </td>
        <td>
            <div><%=Model.DataMayLoad1%></div>
            <div><%=Model.DataMayLoad2%></div> 
            <div><%=Model.DataMayLoad3%></div>
            <div><%=Model.DataMayLoad4%></div>
        </td>
    </tr>
</table>

使用: <td align="right" valign="top">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM