gpt4 book ai didi

javascript - 表格图像表格对齐问题

转载 作者:行者123 更新时间:2023-11-28 12:37:05 24 4
gpt4 key购买 nike

我有一张 table ,那张 table 里面有一张 table ,一张图片和一张 table ,第一张 table 和第二张 table 在同一行上对齐,第三张和最后一张 table 在右边,就像它应该的那样,但在下面的一行第一个表格和图像。谁能告诉我如何将它们全部对齐在同一条线上?

    <body>

<div id="toptable" align="center">
<table Style="border:1px solid #FFFF00;"border="0" width="850" id="Nav" cellpadding="0" cellspacing="0" valign="top">
<td style="width:850 height:60 text-align:center;">
<table style="float:left;border:5px; border-style:outset;border-color:#E80000; height:20px; width:23%; border-spacing:0; border-collapes:collapse;">
<tr Style="background-color:#595959;color:FFFF00;">
<th Style="border:1px solid #FFFF00;font-size:12px; width:45;height:20;"><div style="text-align:center; margin-bottom:-1px;">&nbsp;&nbsp;Symbol&nbsp;&nbsp;</div></TH>
<th Style="border:1px solid #FFFF00;font-size:12px; width:125;height:20;"><div style="text-align:center; margin-bottom:-1px;">Meaning</div></th>
</tr>
<tr>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Not-Scheduled.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></td>
<td style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Not Scheduled</td>
</tr>
<tr>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Gray-Astris3.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></TD>
<td style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">&nbsp;&nbsp;Deactivated Tanks&nbsp;&nbsp;</td>
</tr>
<tr>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Blue-Test.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></td>
<td style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test Scheduled</td>
</tr>
<tr>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Green-Test.png); background-size:22px 24px; width:22; height:24; background-repeat:no-repeat; background-position:center;"></td>
<td style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test In Process</TD>
</tr>
<tr>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Red-Test.png); background-size:22px 24px; width:22; height:24; background-repeat:no-repeat; background-position:center;"></td>
<td style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test Late</td>
</tr>
</table>
<div id="pic" align="center">
<img style="float:none; margin-left:auto; margin-right:auto; margin-top:17px; border:10px ridge #E80000; width:199; height:101; " src="../Images/Logo.jpg" />
</div>
<div id="toptable2" align="center">
<table style="float:right;border:5px; border-style:outset;border-color:#E80000; height:20px; width:23%; border-spacing:0; border-collapes:collapse; vertical-align:top;">
<tr Style="background-color:#595959;color:FFFF00;">
<th Style="border:1px solid #FFFF00;font-size:12px; width:125;height:20;"><div style="text-align:center; margin-bottom:-1px;">Meaning</th>
<th Style="border:1px solid #FFFF00;font-size:12px; width:45;height:20;"><div style="text-align:center; margin-bottom:-1px;">&nbsp;&nbsp;Symbol&nbsp;&nbsp;</th>
</tr>
<tr>
<tf\d style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Not Scheduled</td>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Not-Scheduled.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></td>
</tr>
<tr>
<td style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">&nbsp;&nbsp;Deactivated Tanks&nbsp;&nbsp;</td>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Gray-Astris3.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></td>
</tr>
<tr>
<td style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test Scheduled</td>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Blue-Test.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></td>
</tr>
<tr>
<td style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test In Process</td>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Green-Test.png); background-size:22px 24px; width:22; height:24; background-repeat:no-repeat; background-position:center;"></td>
</tr>
<tr>
<td style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test Late</td>
<td style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Red-Test.png); background-size:22px 24px; width:22; height:24; background-repeat:no-repeat; background-position:center;"></td>
</tr>
</table>
</table>
</td>
</div>

最佳答案

HTML 中的表格非常适合管理它们。因此,为了更好地了解表格在 html 中的工作方式,请点击此链接 How to create table in HTML

<div id="toptable" align="center">
<table Style="border:1px solid #FFFF00;"border="0" width="850" id="Nav" cellpadding="0" cellspacing="0" valign="top">
<td style="width:850 height:60 text-align:center;">
<table style="float:left;border:5px; border-style:outset;border-color:#E80000; height:20px; width:23%; border-spacing:0; border-collapes:collapse;">
<TR Style="background-color:#595959;color:FFFF00;">
<TH Style="border:1px solid #FFFF00;font-size:12px; width:45;height:20;"><div style="text-align:center; margin-bottom:-1px;">&nbsp;&nbsp;Symbol&nbsp;&nbsp;</div></TH>
<TH Style="border:1px solid #FFFF00;font-size:12px; width:125;height:20;"><div style="text-align:center; margin-bottom:-1px;">Meaning</div></TH>
</TR>
<TR>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Not-Scheduled.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></TD>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Not Scheduled</TD>
</TR>
<TR>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Gray-Astris3.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></TD>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">&nbsp;&nbsp;Deactivated Tanks&nbsp;&nbsp;</TD>
</TR>
<TR>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Blue-Test.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></TD>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test Scheduled</TD>
</TR>
<TR>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Green-Test.png); background-size:22px 24px; width:22; height:24; background-repeat:no-repeat; background-position:center;"></TD>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test In Process</TD>
</TR>
<TR>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Red-Test.png); background-size:22px 24px; width:22; height:24; background-repeat:no-repeat; background-position:center;"></TD>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test Late</TD>
</TR>
</table>
<div id="pic" style="float:left" align="center">
<img style="float:none; margin-left:auto; margin-right:auto; margin-top:17px; border:10px ridge #E80000; width:199; height:101; " src="../Images/Logo.jpg" />
</div>
<div id="toptable2" align="center" style='float:left;'>
<table style="float:right;border:5px; border-style:outset;border-color:#E80000; height:20px; width:23%; border-spacing:0; border-collapes:collapse; vertical-align:top;">
<TR Style="background-color:#595959;color:FFFF00;">
<TH Style="border:1px solid #FFFF00;font-size:12px; width:125;height:20;"><div style="text-align:center; margin-bottom:-1px;">Meaning</TH>
<TH Style="border:1px solid #FFFF00;font-size:12px; width:45;height:20;"><div style="text-align:center; margin-bottom:-1px;">&nbsp;&nbsp;Symbol&nbsp;&nbsp;</TH>
</TR>
<TR>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Not Scheduled</TD>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Not-Scheduled.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></TD>
</TR>
<TR>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">&nbsp;&nbsp;Deactivated Tanks&nbsp;&nbsp;</TD>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Gray-Astris3.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></TD>
</TR>
<TR>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test Scheduled</TD>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Blue-Test.png); background-size:22px 24px; width:25; height:24; background-repeat:no-repeat; background-position:center;"></TD>
</TR>
<TR>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test In Process</TD>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Green-Test.png); background-size:22px 24px; width:22; height:24; background-repeat:no-repeat; background-position:center;"></TD>
</TR>
<TR>
<TD style="background-color:#000000; color:FFFF00; border:1px solid #FFFF00; font-family:'Arial'; font-size:12px; text-align:center; font-weight:bold;">Test Late</TD>
<TD style="background-color:#000000;color:FFFF00; border:1px solid #FFFF00;background-image: url(../Images/Red-Test.png); background-size:22px 24px; width:22; height:24; background-repeat:no-repeat; background-position:center;"></TD>
</TR>
</table>
</table>
</td>
</div>

关于javascript - 表格图像表格对齐问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17904900/

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