【问题标题】:Fixed footer with 960.gs用 960.gs 固定页脚
【发布时间】:2023-03-22 03:40:01
【问题描述】:

我想创建固定页脚,但是否可以使用 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>

【问题讨论】:

    标签: css sticky-footer 960.gs


    【解决方案1】:

    我不相信 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>
    

    【讨论】:

      猜你喜欢
      • 2013-02-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多