【问题标题】:How to make sidebar with 100% height that overlays header but in same time doesnt overlay footer如何制作覆盖页眉但同时不覆盖页脚的 100% 高度的侧边栏
【发布时间】:2012-04-28 10:16:21
【问题描述】:

我正在编辑 Drupal 主题,并试图弄清楚如何制作可根据内容、覆盖页眉但同时不会覆盖页脚的侧边栏。有点难以解释,所以我画了一张图片 -> http://i48.tinypic.com/hs2r9t.png

我已经制作了绿色区域 - 内容灵活,所以当我向其中添加文章时,它会拉伸并将页脚移动得更深。

谢谢

【问题讨论】:

    标签: html css drupal layout drupal-theming


    【解决方案1】:

    从未使用过 Drupal,但在 HTML+CSS 中,以下内容对你有用:

    #sidebar { 
        float: left; /* push it to the left */
    }
    #header { 
        overflow: hidden; /* new block formatting context */
    }
    #content { 
        overflow: hidden; 
    }
    #footer { 
        clear: left; /* clear the float */
    }​
    

    jsFiddle Demo

    如果您打算使用布局,则必须学习 HTML 和 CSS。

    【讨论】:

      猜你喜欢
      • 2010-12-23
      • 1970-01-01
      • 2021-12-27
      • 1970-01-01
      • 1970-01-01
      • 2017-07-19
      • 1970-01-01
      • 1970-01-01
      • 2011-02-01
      相关资源
      最近更新 更多