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>
4

1 回答 1

0

我不相信 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>
于 2010-06-05T17:39:22.013 回答