960 网格中的折叠漂浮物

发布于 2024-09-08 07:06:01 字数 619 浏览 0 评论 0原文

我正在尝试使用 960 网格系统,并在页面顶部和底部显示页眉和页脚图形。这些图形需要比 960 网格更宽。标题工作正常 - DIV、绝对位置、宽度 100%、居中,完美地完成了工作。

但现在我想要同样的东西,但在页面底部。即与页脚部分的底部对齐。我想我会将背景图像附加到 .container_16 div 的底部,位于底部。这样,页脚图像将始终位于内容的底部。

到目前为止,这是我的尝试: http://www.northtreestudios.com/sandbox

红线是的边框body 标记,蓝线是 .container_16 div 的边框。我在我能想到的任何地方都放置了一个清除 div (

),但我不做任何事情都不会得到 .container_16< /code> div 或 body 标签来扩展以包含页脚!

我已经在网上搜索了几个小时,但我已经没有想法了......

I am trying to use the 960 grid system with header and footer graphics at the top and bottom of the page. These graphics need to go wider than the 960 grid. The header works fine - a DIV, position absolute, width 100%, and centered, does the job perfectly.

But now I want the same thing, but at the bottom of the page. I.e. aligned with the bottom of the footer section. I figured I would attach the background image to the bottom of the .container_16 div, positioned on the bottom. This way, the footer image would always stay with the bottom of the content.

Here is my attempt so far:
http://www.northtreestudios.com/sandbox

The red line is the border of the body tag, and the blue line the border of the .container_16 div. I put a clearing div (<div class="clear"></div>) everywhere I could think of, but I nothing I do will get either the .container_16 div or the body tag to expand to include the footer!

I have been scouring the web for hours, and I am running out of ideas ...

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

胡大本事 2024-09-15 07:06:01

如果这是您想要的,那么只需执行以下操作:

#container {
    border:2px solid blue;
    top:0;
    width:960px;
}

或者如果您希望导航为在顶部执行此操作:

#container {
    border:2px solid blue;
    top:0;
    width:960px;
    margin-top:-250px;
}

If this is what you want, then just do this:

#container {
    border:2px solid blue;
    top:0;
    width:960px;
}

Or if you want that navigation to be right at the top do this:

#container {
    border:2px solid blue;
    top:0;
    width:960px;
    margin-top:-250px;
}
卸妝后依然美 2024-09-15 07:06:01

这可能已经解决了问题,但它涉及修改 960GS 框架。如果您发布原始 HTML 代码,我很乐意调查为什么会发生这种情况。

That might have resolved it but it involved modifying the 960GS framework. If you post your original HTML code I'm happy to investigate why this was happening.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文