【问题标题】:Footer doesn't take the height of the inside wrapper页脚不占用内包装的高度
【发布时间】:2014-03-15 17:15:16
【问题描述】:

有谁知道这个问题吗?

css:

    footer {
    width:100%;
    height:auto;
    background:black;
}
footer .wrapper {
    width:1000px;
    height:auto;
    margin:0 auto;
    color:grey;
}
footer .wrapper .footer_column {
    width:333.3px;
    height:auto;
    float:left;
}

HTML

<footer>
    <div class="wrapper">
        <div class="footer_column">
            Content
        </div>
        <div class="footer_column">
            Content
        </div>
        <div class="footer_column">
            Content
        </div>
    </div>
</footer>

提前致谢

http://jsfiddle.net/cWCFV/

【问题讨论】:

  • 我不明白这个问题。当您的 footer_column div 中的内容增长时,您是否希望您的页脚扩展?
  • 确实是的 :) 但我不知道如何
  • 这是一个“请修复我的代码。”类型的问题。
  • 为什么这是一个“请修复我的代码”的问题?当我自己没有发现问题时,我会问其他人?

标签: html css


【解决方案1】:

放溢出:自动;在您的页脚 div 中。

footer {
    width:100%;
    height:auto;
    background-color:red;
    overflow: auto;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-04
    • 1970-01-01
    • 2023-02-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-06
    • 1970-01-01
    • 2015-10-26
    相关资源
    最近更新 更多