【问题标题】:How do I make the right table have priority over the top table?如何使正确的表优先于顶层表?
【发布时间】:2010-09-29 14:10:04
【问题描述】:

如何让右表优先于顶层表?

我希望右边的表格(粉红色的那个)一直到网页的顶部。我希望顶部的黄色表格在屏幕右侧开始的粉红色表格结束?链接到我在说什么:

http://wpiix10.x10.mx/ifoot11.htm

这是我正在使用的代码:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%" bgcolor="#C0C0C0" style="position: absolute; left: 0; bottom: 0">
    <tr>
        <td>
        <table border="0" width="100%" cellspacing="0" cellpadding="0" style="position: absolute; bottom: 0" bgcolor="#00FF00" height="23" bordercolor="#FFFFFF">
            <!-- MSTableType="nolayout" -->
            <tr>
                <td>&nbsp;</td>
            </tr>
        </table>
        <div align="right" style="height: 100%;">

            <table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#FFFF00" height="105">
                <tr>
                        <td>&nbsp;</td>
                </tr>
            </table>

            <table border="0" width="200" align="right" cellspacing="0" cellpadding="0" bgcolor="#FF00FF" height="100%">
                <tr>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                </tr>
            </table>
        </div>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</td>
    </tr>
</table>

</body>

</html>

【问题讨论】:

    标签: html css


    【解决方案1】:

    根据您要显示的内容,您应该只使用 div 而不是表格。它们更容易在您的页面上调度,使它们越过其他元素等。

    如果您仍想使用表格(原文如此),在您目前的情况下,您应该只使用一张表格。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-20
      • 1970-01-01
      • 1970-01-01
      • 2022-01-17
      • 2021-11-15
      • 2021-09-20
      相关资源
      最近更新 更多