固定页脚为 960.gs

发布于 2024-09-04 00:27:10 字数 356 浏览 3 评论 0原文

我想创建固定页脚,但是 960 gs 是否可能,因为我在容器 div 的高度方面遇到问题。我无法将其设置为 %100。

<div class="container_12" > 
    <div class="grid_3" id="side-space"></div>
    <div class="grid_6">
         <div id="content-box"></div>
    </div>
    <div class="grid_3" id="side-space"></div>
</div>

I want to create fixed footer but , is it possible with 960 gs , because I am having trouble with height of container div . I can no set it to %100.

<div class="container_12" > 
    <div class="grid_3" id="side-space"></div>
    <div class="grid_6">
         <div id="content-box"></div>
    </div>
    <div class="grid_3" id="side-space"></div>
</div>

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

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

发布评论

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

评论(1

够运 2024-09-11 00:27:10

我不相信 960.gs 与高度有太大关系..它只涉及柱子和清理。不错的框架。尝试将 body 设置为 100%,然后将 #content-box 设置为 100%。这是我偶然遇到的一个例子

<!-- IE in quirks mode -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<title>Fixed footer</title>
<style type="text/css">
body{
margin:0;
padding:0 0 <length> 0;
}
div#footer{
position:absolute;
bottom:0;
left:0;
width:100%;
height:<length>;
}
@media screen{
body>div#footer{
position: fixed;
}
}
* html body{
overflow:hidden;
} 
* html div#content{
height:100%;
overflow:auto;
}
</style>
<div id="footer"> footer </div>
<div id="content"> content </div>

I don't believe 960.gs has much to do with height.. it just deals with columns and clearing. Nice framework to start with. Try setting body to 100% and then setting #content-box to 100%. Here is a random example I came across

<!-- IE in quirks mode -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<title>Fixed footer</title>
<style type="text/css">
body{
margin:0;
padding:0 0 <length> 0;
}
div#footer{
position:absolute;
bottom:0;
left:0;
width:100%;
height:<length>;
}
@media screen{
body>div#footer{
position: fixed;
}
}
* html body{
overflow:hidden;
} 
* html div#content{
height:100%;
overflow:auto;
}
</style>
<div id="footer"> footer </div>
<div id="content"> content </div>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文