导航表在Chrome中无法正确对齐

时间:2013-05-02 12:15:45

标签: php html css html-table

在我的一个旧网站上,我的代码非常混乱且过时,我在Chrome浏览器中遇到了导航菜单问题。它在Firefox和IE中完美对齐,但由于某些原因,在Chrome中只有前三个标签正确居中。

http://jsfiddle.net/8b2Cm/1/

<table width="765"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">

<td valign="top">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">

  <tr valign="top">

    <td width="19%"><a href="http://LINK"><img src="http://LINK" alt="" width="331" height="95" border="0"></a></td>

    <td width="81%"><img src="http://LINK/images/logo.jpg" alt="" width="434" height="95"></td>

  </tr>

</table>
</td>

<td valign="top" class="back1"><table width="100%"  border="0" cellspacing="0" cellpadding="0">

  <tr valign="top">

    <td width="1%"><img src="http://LINK/images/left-top.jpg" width="23" height="30" alt=""></td>

    <td width="98%" valign="middle"><table width="100%"  border="0" cellspacing="0" cellpadding="0">

      <tr>

        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">

          <tr>

            <td width="90%" class="left-text11"><div align="center"><a href="http://LINK" title="" class="left-text11"> Home</a></div></td>

            <td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>

          </tr>

        </table></td>

        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">

          <tr>

            <td width="90%" class="left-text11"><div align="center" class="left-text11">

            <? if(!$_SESSION['sbprj_userid'])

        {

        ?><a href="http://LINK/register/" title="Registration" class="left-text11"><strong>Signup</strong></a>

        <?

        }else

        {

        ?><a href="http://LINK/myaccount.php" title="My Account" class="left-text11">My Account</a>

        <?

        }

        ?></div></td>

            <td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>

          </tr>

        </table></td>

        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">

          <tr>

            <td align="center" width="90%" class="left-text11"><div align="center"><a href="http://LINK/free-poker-money/" title="Get Free Poker Money" class="left-text11">Free Poker Money </a></div></td>


          </tr>

        </table></td>

        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">

          <tr>



            <td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>

          </tr>

        </table></td>

        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">

          <tr>

            <td align="center" width="90%" class="left-text11"><div align="center"><a href="http://LINK//" title="" class="left-text11">Poker School</a></div></td>


          </tr>

        </table></td>

        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">

          <tr>



            <td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>

          </tr>

        </table></td>

        <td class="left-text11"><table width="100%"  border="0" cellspacing="0" cellpadding="0">





          <tr>

            <td width="90%" class="left-text11"><div align="center"><a href="http://LINK/news/" title="News" class="left-text11">News </a></div></td>

            <td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>

          </tr>



        </table></td>

        <td class="left-text11"><table width="100%"  border="0" cellspacing="0" cellpadding="0">





          <tr>

            <td width="90%" class="left-text11"><div align="center"><a href="http://LINK/support/" title="Contact Us" class="left-text11">Support </a></div></td>

            <td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>

          </tr>



        </table></td>

        <td class="left-text11"><table width="100%"  border="0" cellspacing="0" cellpadding="0">





          <tr>

            <td width="90%" class="left-text11"><div align="center"><a href="http://www.facebook.com/pokercash4free" target="_blank" title="Facebook" class="left-text11"><img src="http://LINK/images/facebook.png" border="0" width="28" height="25" /></a> <a href="https://twitter.com/pokercashfofree" target="_blank" title="Twitter" class="left-text11"><img src="http://LINK/images/twitter.png" border="0" width="28" height="25" /></a> <a href="https://plus.google.com/u/0/b/112112204165108610596/112112204165108610596/" target="_blank" title="Google+" class="left-text11"><img src="http://LINK/images/googleplus.png" border="0" width="28" height="25" /></a></div></td>


          </tr>



        </table></td>




      </tr>



    </table></td>

    <td width="1%"><img src="http://LINK/images/right-top.jpg" width="24" height="30" alt=""></td>

  </tr>

</table></td>

<td valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">

  <tr valign="top">

    <td width="1%"><img src="http://LINK/images/top-1.jpg" width="23" height="17" alt=""></td>

    <td width="98%" class="back2"><img src="http://LINK/images/back2.jpg" width="9" height="17" alt=""></td>

    <td width="1%"><img src="http://LINK/images/right-1.jpg" width="24" height="17" alt=""></td>

  </tr>

</table></td>

这是代码,有关如何解决此问题的任何建议吗?

1 个答案:

答案 0 :(得分:0)

分离器混乱 一些分隔符在表格内(水平表格带有标签,顺便说一句,你应该只把那个表放入小提琴和代码中,而不是整个混乱让我们更难理解)单元格,其他分隔符单独出现在单独的列中,因此它们与列相同的地方。检查并移动它们,就像在前两个标签中完成的那样