简体   繁体   English

如何在表格内相对于表格单元格之一对齐此div?

[英]How do I align this div inside a table relative to one of the table's cells?

This is what I have right now from this code: 这是我现在从此代码中得到的:

<table><tr>
    <td><div id="adt"></div></td> <!-- 336x280 ad code -->
    <td id="butw"><div id="butto">Follow @Twitter</div></td> <!-- Twitter Button -->
    <td><div id="ado"></div></td> <!-- 300x600 ad code -->  
</tr></table>

(image of the result) (结果图像)

My goal is to get the Twitter div to be aligned underneath the first TD . 我的目标是使Twitter div与第一个TD对齐。 I'm not sure whether to use CSS to align the div relative to the table cell or if there's another method I'm forgetting. 我不确定是否要使用CSS将div相对于表格单元格对齐,或者我是否忘记了另一种方法。

One way to do this is by moving the Twitter div to the next row. 一种方法是将Twitter div移至下一行。

<table>
    <tr>
        <td><div id="adt"></div></td> <!-- 336x280 ad code -->
        <td><div id="ado"></div></td> <!-- 300x600 ad code -->  
    </tr>
    <tr>
        <td id="butw"><div id="butto">Follow @Twitter</div></td> <!-- Twitter Button -->
        <td> <!-- extra TD here --> </td>
    </tr>
</table>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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