IE8 中的浮动 CSS 页脚

发布于 2024-09-10 17:36:26 字数 800 浏览 1 评论 0原文

嗨,这个问题可能会被问几次,但我找不到我正在做的事情的具体示例,我有一个页脚:

<div id="Footer">
        <table>
        <tr>
            <td colspan="3">
                <span>Copyright</span> 
            </td>
            <td>
                <asp:Label runat="server" ID="lblVersion"></asp:Label> 
            </td>
        </tr>
        </table>     
    </div>

和这个 CSS:

div#Footer
{
  padding: 4px 1px 1px 0px;
  margin: 0px;
  margin-top:80px; 
  border-top: thin solid #000000;
  height:1.5em;
  background-color:#333333;
  color:White;
}

在 IE6 中,这工作得很好,在 IE8 中,分辨率为 1280 x 1024 和上面这个工作正常,但是低于这个分辨率或者当 IE 窗口变小时,页脚会浮动,我尝试过设置位置/浮动/清除/显示样式设置,但没有运气,有人知道如何制作这个棒吗在较小的屏幕分辨率下位于底部?

Hi this question might be asked a few times, but I can't find a specific example for what I'm doing, I have a footer:

<div id="Footer">
        <table>
        <tr>
            <td colspan="3">
                <span>Copyright</span> 
            </td>
            <td>
                <asp:Label runat="server" ID="lblVersion"></asp:Label> 
            </td>
        </tr>
        </table>     
    </div>

and this CSS:

div#Footer
{
  padding: 4px 1px 1px 0px;
  margin: 0px;
  margin-top:80px; 
  border-top: thin solid #000000;
  height:1.5em;
  background-color:#333333;
  color:White;
}

In IE6 this worked fine, in IE8 in resolutions of 1280 x 1024 and above this works fine, but below this resolution or when the IE window is made smaller, the footer floats, I've tried setting position/float/clear/display style settings with no luck, does anyone have any ideas how to make this stick at the bottom in smaller screen resolutions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文