gpt4 book ai didi

html - 在 html 表格中顶部对齐?

转载 作者:技术小花猫 更新时间:2023-10-29 11:41:32 26 4
gpt4 key购买 nike

如何让图像和内容右对齐?如您所见,我尝试了 valign="top"。

<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr valign="top">
<td valign="top"><img alt="" style="border: 0px solid;" src="/Portals/0/affiliates/NFL.png" /></td>
<td valign="top">&nbsp;</td>
<td valign="top" style="padding-left: 10px;"><strong><span class="cnt5_heading" style="color: #c00000;">NFL</span><br />
</strong><span class="body_copy" valign="top">The official website for the National Football League. <a href="http://www.nfl.com/" target="_blank">Learn more &gt;&gt;</a></span></td>
</tr>
<tr valign="top">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr valign="top">
<td valign="top"><img alt="" src="/Portals/0/affiliates/NFL_players_association.png" /></td>
<td>&nbsp;</td>
<td valign="top" style="padding-left: 10px;"><strong><span class="cnt5_heading" style="color: #c00000;">NFL Players Association</span><br />
</strong><span class="body_copy" valign="top">"We, The National Football League Players Association ... Pay homage to our predecessors for their courage, sacrifice, and vision; ... Pledge to preserve and enhance the democratic involvement of our members; ... Confirm our willingness to do whatever is necessary for the betterment of our membership - To preserve our gains and achieve those goals not yet attained." <a href="http://www.nflplayers.com" target="_blank">Learn more &gt;&gt;</a></span></td>
</tr>
<tr valign="top">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr valign="top">
<td valign="top"><img alt="" src="/Portals/0/affiliates/NFL_play_benfits.png" /></td>
<td><strong>&nbsp;</strong></td>
<td valign="top" style="padding-left: 10px;"><strong><span class="cnt5_heading" style="color: #c00000;">NFL Player Benefits</span></strong><br />
<span class="body_copy">A Complete guide to the benefits available for NFL players. <a href="http://nfla.davidhenryagency.com/BenefitsampServices.aspx" target="_self">Learn more &gt;&gt;</a></span></td>
</tr>
<tr valign="top">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr valign="top">
<td valign="top"><img alt="" src="/Portals/0/affiliates/NFL_hall_fame.png" /></td>
<td>&nbsp;</td>
<td valign="top" style="padding-left: 10px;"><strong><span class="cnt5_heading" style="color: #c00000;">Pro football Hall of Fame</span></strong><br />
<span class="body_copy">The Mission of the Pro Football Hall of Fame is: To honor, preserve, educate and promote. <a href="http://www.profootballhof.com/default.aspx" target="_blank">Learn more &gt;&gt;</a></span><br />
</td>
</tr>
</tbody>
</table>

最佳答案

一些CSS:

table td, table td * {
vertical-align: top;
}

关于html - 在 html 表格中顶部对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3673483/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com